summaryrefslogtreecommitdiff
path: root/lib/AsmParser/LLParser.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-01 05:14:45 +0000
committerChris Lattner <sabre@nondot.org>2010-04-01 05:14:45 +0000
commit449c3103c5d8a3105ac1a46187ac1c7e1bdc0ba2 (patch)
treec88af10d7034596af40c36c6202f7b87a9924cf2 /lib/AsmParser/LLParser.h
parente6bb172f7ecb340051cd755f1ea65737b2c4bf26 (diff)
downloadllvm-449c3103c5d8a3105ac1a46187ac1c7e1bdc0ba2.tar.gz
llvm-449c3103c5d8a3105ac1a46187ac1c7e1bdc0ba2.tar.bz2
llvm-449c3103c5d8a3105ac1a46187ac1c7e1bdc0ba2.tar.xz
rewrite handling of forward ref'd instruction metadata
to used deferred resolution instead of creating a temporary node + rauw. There is no reason to create the temporary mdnode, then do rauw, then destroy it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100086 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/LLParser.h')
-rw-r--r--lib/AsmParser/LLParser.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/AsmParser/LLParser.h b/lib/AsmParser/LLParser.h
index 85cd086606..0610fc8bbd 100644
--- a/lib/AsmParser/LLParser.h
+++ b/lib/AsmParser/LLParser.h
@@ -76,6 +76,14 @@ namespace llvm {
LLVMContext& Context;
LLLexer Lex;
Module *M;
+
+ // Instruction metadata resolution. Each instruction can have a list of
+ // MDRef info associated with them.
+ struct MDRef {
+ SMLoc Loc;
+ unsigned MDKind, MDSlot;
+ };
+ DenseMap<Instruction*, std::vector<MDRef> > ForwardRefInstMetadata;
// Type resolution handling data structures.
std::map<std::string, std::pair<PATypeHolder, LocTy> > ForwardRefTypes;
@@ -203,6 +211,7 @@ namespace llvm {
bool ParseNamedMetadata();
bool ParseMDString(MDString *&Result);
bool ParseMDNodeID(MDNode *&Result);
+ bool ParseMDNodeID(MDNode *&Result, unsigned &SlotNo);
// Type Parsing.
bool ParseType(PATypeHolder &Result, bool AllowVoid = false);