summaryrefslogtreecommitdiff
path: root/lib/AsmParser/LLParser.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-02-06 06:52:58 +0000
committerBill Wendling <isanbard@gmail.com>2013-02-06 06:52:58 +0000
commit95ce4c2ffb0ff31a79b060fb112659322a5be3bf (patch)
treea0c49a46b4877c7b3ac712892d8c6601dc4fed35 /lib/AsmParser/LLParser.h
parent97fe3d95110db54908527e547187b3007185e46c (diff)
downloadllvm-95ce4c2ffb0ff31a79b060fb112659322a5be3bf.tar.gz
llvm-95ce4c2ffb0ff31a79b060fb112659322a5be3bf.tar.bz2
llvm-95ce4c2ffb0ff31a79b060fb112659322a5be3bf.tar.xz
Initial submission for the attribute group feature.
Attribute groups are of the form: #0 = attributes { noinline "no-sse" "cpu"="cortex-a8" alignstack=4 } Target-dependent attributes are represented as strings. Attributes can have optional values associated with them. E.g., the "cpu" attribute has the value "cortex-a8". Target-independent attributes are listed as enums inside the attribute classes. Multiple attribute groups can be referenced by the same object. In that case, the attributes are merged together. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174493 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/LLParser.h')
-rw-r--r--lib/AsmParser/LLParser.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/AsmParser/LLParser.h b/lib/AsmParser/LLParser.h
index d8de77908c..131331a5bc 100644
--- a/lib/AsmParser/LLParser.h
+++ b/lib/AsmParser/LLParser.h
@@ -125,6 +125,9 @@ namespace llvm {
std::map<ValID, std::vector<std::pair<ValID, GlobalValue*> > >
ForwardRefBlockAddresses;
+ // Attribute builder reference information.
+ std::map<unsigned, AttrBuilder> ForwardRefAttrBuilder;
+
public:
LLParser(MemoryBuffer *F, SourceMgr &SM, SMDiagnostic &Err, Module *m) :
Context(m->getContext()), Lex(F, SM, Err, m->getContext()),
@@ -236,6 +239,8 @@ namespace llvm {
bool ParseMDString(MDString *&Result);
bool ParseMDNodeID(MDNode *&Result);
bool ParseMDNodeID(MDNode *&Result, unsigned &SlotNo);
+ bool ParseUnnamedAttrGrp();
+ bool ParseAttributeValuePairs(AttrBuilder &B);
// Type Parsing.
bool ParseType(Type *&Result, bool AllowVoid = false);