Parse custom metadata attached with an instruction.
[oota-llvm.git] / lib / AsmParser / LLParser.h
index 43e9bd81f59b1a760c42b208abfbbb732f52873e..97bf2f309f6d53a5317e8cab805bb0976ef9593b 100644 (file)
@@ -48,7 +48,7 @@ namespace llvm {
     /// MetadataCache - This map keeps track of parsed metadata constants.
     std::map<unsigned, MetadataBase *> MetadataCache;
     std::map<unsigned, std::pair<MetadataBase *, LocTy> > ForwardRefMDNodes;
-    SmallVector<std::pair<MDKindID, MDNode *>, 2> MDsOnInst;
+    SmallVector<std::pair<unsigned, MDNode *>, 2> MDsOnInst;
     struct UpRefRecord {
       /// Loc - This is the location of the upref.
       LocTy Loc;
@@ -75,11 +75,9 @@ namespace llvm {
     std::map<std::string, std::pair<GlobalValue*, LocTy> > ForwardRefVals;
     std::map<unsigned, std::pair<GlobalValue*, LocTy> > ForwardRefValIDs;
     std::vector<GlobalValue*> NumberedVals;
-    Function* MallocF;
   public:
     LLParser(MemoryBuffer *F, SourceMgr &SM, SMDiagnostic &Err, Module *m) : 
-      Context(m->getContext()), Lex(F, SM, Err, m->getContext()),
-      M(m), MallocF(NULL) {}
+      Context(m->getContext()), Lex(F, SM, Err, m->getContext()), M(m) {}
     bool Run();
 
     LLVMContext& getContext() { return Context; }
@@ -130,7 +128,7 @@ namespace llvm {
     bool ParseOptionalVisibility(unsigned &Visibility);
     bool ParseOptionalCallingConv(CallingConv::ID &CC);
     bool ParseOptionalAlignment(unsigned &Alignment);
-    bool ParseOptionalDbgInfo();
+    bool ParseOptionalCustomMetadata();
     bool ParseOptionalInfo(unsigned &Alignment);
     bool ParseIndexList(SmallVectorImpl<unsigned> &Indices);
 
@@ -278,8 +276,7 @@ namespace llvm {
     bool ParseShuffleVector(Instruction *&I, PerFunctionState &PFS);
     bool ParsePHI(Instruction *&I, PerFunctionState &PFS);
     bool ParseCall(Instruction *&I, PerFunctionState &PFS, bool isTail);
-    bool ParseAlloc(Instruction *&I, PerFunctionState &PFS,
-                    BasicBlock *BB = 0, bool isAlloca = true);
+    bool ParseAlloc(Instruction *&I, PerFunctionState &PFS, unsigned Opc);
     bool ParseFree(Instruction *&I, PerFunctionState &PFS);
     bool ParseLoad(Instruction *&I, PerFunctionState &PFS, bool isVolatile);
     bool ParseStore(Instruction *&I, PerFunctionState &PFS, bool isVolatile);