Fix build break
authorFadi Hanna <fadim@microsoft.com>
Wed, 23 Mar 2016 22:58:49 +0000 (15:58 -0700)
committerFadi Hanna <fadim@microsoft.com>
Wed, 23 Mar 2016 22:58:49 +0000 (15:58 -0700)
src/vm/clsload.cpp
src/vm/clsload.hpp

index 363c4dc..dfe2f38 100644 (file)
@@ -891,13 +891,13 @@ void ClassLoader::GetClassValue(NameHandleTable nhTable,
         if (pLookInThisModuleOnly && (pCurrentClsModule != pLookInThisModuleOnly))
             continue;
 
+#ifdef FEATURE_READYTORUN
         if (nhTable == nhCaseSensitive && pCurrentClsModule->IsReadyToRun() && pCurrentClsModule->GetReadyToRunInfo()->HasHashtableOfTypes())
         {
             // For R2R modules, we only search the hashtable of token types stored in the module's image, and don't fallback
             // to searching m_pAvailableClasses or m_pAvailableClassesCaseIns (in fact, we don't even allocate them for R2R modules).
             // Also note that type lookups in R2R modules only support case sensitive lookups.
 
-#ifdef FEATURE_READYTORUN
             mdToken mdFoundTypeToken;
             if (pCurrentClsModule->GetReadyToRunInfo()->TryLookupTypeTokenFromName(pName, &mdFoundTypeToken))
             {
@@ -915,15 +915,16 @@ void ClassLoader::GetClassValue(NameHandleTable nhTable,
 
                 return; // Return on the first success
             }
-#endif
         }
         else
+#endif
         {
             EEClassHashTable* pTable = NULL;
             if (nhTable == nhCaseSensitive)
             {
                 *ppTable = pTable = pCurrentClsModule->GetAvailableClassHash();
 
+#ifdef FEATURE_READYTORUN
                 if (pTable == NULL && pCurrentClsModule->IsReadyToRun() && !pCurrentClsModule->GetReadyToRunInfo()->HasHashtableOfTypes())
                 {
                     // Old R2R image generated without the hashtable of types.
@@ -933,6 +934,7 @@ void ClassLoader::GetClassValue(NameHandleTable nhTable,
                     needsToBuildHashtable = TRUE;
                     return;
                 }
+#endif
             }
             else
             {
index c25978b..ca561a8 100644 (file)
@@ -71,12 +71,9 @@ public:
     } TokenTypeEntry;
 
 private:
-    EntryType m_EntryType;
-    union
-    {
-        PTR_EEClassHashEntry    m_pClassHashEntry;
-        TokenTypeEntry          m_TokenAndModulePair;
-    };
+    EntryType               m_EntryType;
+    PTR_EEClassHashEntry    m_pClassHashEntry;
+    TokenTypeEntry          m_TokenAndModulePair;
 
 public:
     HashedTypeEntry()