summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 5a875fee07b..71315f3c0fb 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -4838,6 +4838,15 @@ bool LLParser::ParseDIExpression(MDNode *&Result, bool IsDistinct) {
return TokError(Twine("invalid DWARF op '") + Lex.getStrVal() + "'");
}
+ if (Lex.getKind() == lltok::DwarfAttEncoding) {
+ if (unsigned Op = dwarf::getAttributeEncoding(Lex.getStrVal())) {
+ Lex.Lex();
+ Elements.push_back(Op);
+ continue;
+ }
+ return TokError(Twine("invalid DWARF attribute encoding '") + Lex.getStrVal() + "'");
+ }
+
if (Lex.getKind() != lltok::APSInt || Lex.getAPSIntVal().isSigned())
return TokError("expected unsigned integer");
OpenPOWER on IntegriCloud