[ORC] Strip the Materializing flag off finalized symbols in VSOs.
authorLang Hames <lhames@gmail.com>
Thu, 14 Jun 2018 15:32:56 +0000 (15:32 +0000)
committerLang Hames <lhames@gmail.com>
Thu, 14 Jun 2018 15:32:56 +0000 (15:32 +0000)
Finalized symbols are no longer in the materializing state.

llvm-svn: 334721

llvm/lib/ExecutionEngine/Orc/Core.cpp

index 5eb6d14..5ae65ab 100644 (file)
@@ -562,8 +562,9 @@ void VSO::finalize(const SymbolFlagsMap &Finalized) {
             // MaterializingInfo and update its materializing state.
             assert(DependantVSO.Symbols.count(DependantName) &&
                    "Dependant has no entry in the Symbols table");
-            DependantVSO.Symbols[DependantName].getFlags() &=
-                JITSymbolFlags::Materializing;
+            auto &DependantSym = DependantVSO.Symbols[DependantName];
+            DependantSym.setFlags(static_cast<JITSymbolFlags::FlagNames>(
+                DependantSym.getFlags() & ~JITSymbolFlags::Materializing));
             DependantVSO.MaterializingInfos.erase(DependantMII);
           }
         }
@@ -580,7 +581,9 @@ void VSO::finalize(const SymbolFlagsMap &Finalized) {
         }
         assert(Symbols.count(Name) &&
                "Symbol has no entry in the Symbols table");
-        Symbols[Name].getFlags() &= ~JITSymbolFlags::Materializing;
+        auto &Sym = Symbols[Name];
+        Sym.setFlags(static_cast<JITSymbolFlags::FlagNames>(
+            Sym.getFlags() & ~JITSymbolFlags::Materializing));
         MaterializingInfos.erase(MII);
       }
     }