summaryrefslogtreecommitdiff
path: root/lib/AsmParser/LLParser.h
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-04-02 08:54:30 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-04-02 08:54:30 +0000
commit104bd8179fb5f6551c65c94ebcd0a4918b060189 (patch)
treecf5763d092b81cecc168fa28032247ee495d06e2 /lib/AsmParser/LLParser.h
parent2f12f10af369d468b14617276446166383d692ed (diff)
Notes
Diffstat (limited to 'lib/AsmParser/LLParser.h')
-rw-r--r--lib/AsmParser/LLParser.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/AsmParser/LLParser.h b/lib/AsmParser/LLParser.h
index 9abe40427367..ae460bbb57b3 100644
--- a/lib/AsmParser/LLParser.h
+++ b/lib/AsmParser/LLParser.h
@@ -17,6 +17,7 @@
#include "LLLexer.h"
#include "llvm/Module.h"
#include "llvm/Type.h"
+#include "llvm/ADT/DenseMap.h"
#include "llvm/Support/ValueHandle.h"
#include <map>
@@ -76,6 +77,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;
@@ -171,8 +180,7 @@ namespace llvm {
bool ParseOptionalCallingConv(CallingConv::ID &CC);
bool ParseOptionalAlignment(unsigned &Alignment);
bool ParseOptionalStackAlignment(unsigned &Alignment);
- bool ParseInstructionMetadata(SmallVectorImpl<std::pair<unsigned,
- MDNode *> > &);
+ bool ParseInstructionMetadata(Instruction *Inst);
bool ParseOptionalCommaAlign(unsigned &Alignment, bool &AteExtraComma);
bool ParseIndexList(SmallVectorImpl<unsigned> &Indices,bool &AteExtraComma);
bool ParseIndexList(SmallVectorImpl<unsigned> &Indices) {
@@ -204,6 +212,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);