AsmParser: Save and restore the parsing state for types using SlotMapping.
[oota-llvm.git] / lib / AsmParser / LLParser.h
index dbbb97ab62a4aa5ddd6a0623c758808700798b92..96fb06a1f296def76dfa938e7b088a6c19a8e9d0 100644 (file)
@@ -146,7 +146,7 @@ namespace llvm {
           Slots(Slots), BlockAddressPFS(nullptr) {}
     bool Run();
 
-    bool parseStandaloneConstantValue(Constant *&C);
+    bool parseStandaloneConstantValue(Constant *&C, const SlotMapping *Slots);
 
     LLVMContext &getContext() { return Context; }
 
@@ -159,6 +159,10 @@ namespace llvm {
       return Error(Lex.getLoc(), Msg);
     }
 
+    /// Restore the internal name and slot mappings using the mappings that
+    /// were created at an earlier parsing stage.
+    void restoreParsingState(const SlotMapping *Slots);
+
     /// GetGlobalVal - Get a value with the specified name or ID, creating a
     /// forward reference record if needed.  This can return null if the value
     /// exists but does not have the right type.