diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-02-08 06:32:06 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-02-08 06:32:06 +0000 |
commit | baad55c3ab85d57003e9711084f1a95fcab76fdf (patch) | |
tree | 8c4d7be688f896b32d7c2f953e1343a150cc7e24 /lib/AsmParser/LLParser.h | |
parent | 61b97b8c1721ba45e5c10ca307ceebe1efdf72a9 (diff) | |
download | llvm-baad55c3ab85d57003e9711084f1a95fcab76fdf.tar.gz llvm-baad55c3ab85d57003e9711084f1a95fcab76fdf.tar.bz2 llvm-baad55c3ab85d57003e9711084f1a95fcab76fdf.tar.xz |
Parse the attribute group reference on a function.
Attribute references are of this form:
define void @foo() #0 #1 #2 { ... }
Parse them for function attributes. If there's more than one reference, then
they are merged together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/LLParser.h')
-rw-r--r-- | lib/AsmParser/LLParser.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/AsmParser/LLParser.h b/lib/AsmParser/LLParser.h index 3cc2a8d7e7..42cdbd5122 100644 --- a/lib/AsmParser/LLParser.h +++ b/lib/AsmParser/LLParser.h @@ -126,7 +126,8 @@ namespace llvm { ForwardRefBlockAddresses; // Attribute builder reference information. - std::map<unsigned, AttrBuilder> ForwardRefAttrBuilder; + std::map<Value*, std::vector<unsigned> > ForwardRefAttrGroups; + std::map<unsigned, AttrBuilder> NumberedAttrBuilders; public: LLParser(MemoryBuffer *F, SourceMgr &SM, SMDiagnostic &Err, Module *m) : @@ -239,7 +240,9 @@ namespace llvm { bool ParseMDNodeID(MDNode *&Result); bool ParseMDNodeID(MDNode *&Result, unsigned &SlotNo); bool ParseUnnamedAttrGrp(); - bool ParseFnAttributeValuePairs(AttrBuilder &B, bool inAttrGrp); + bool ParseFnAttributeValuePairs(AttrBuilder &B, + std::vector<unsigned> &FwdRefAttrGrps, + bool inAttrGrp); // Type Parsing. bool ParseType(Type *&Result, bool AllowVoid = false); |