aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/AsmParser/LLLexer.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-13 01:17:35 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-13 01:17:35 +0000
commitcd6636c3bf05e86396b097ce1623ab9993d5adcb (patch)
tree440463e3b81aafeefc8090ad6aad10a8a8289160 /llvm/lib/AsmParser/LLLexer.cpp
parent09e03f38d664ed09b6add37050c2df6cf1116272 (diff)
downloadllvm-cd6636c3bf05e86396b097ce1623ab9993d5adcb.zip
llvm-cd6636c3bf05e86396b097ce1623ab9993d5adcb.tar.gz
llvm-cd6636c3bf05e86396b097ce1623ab9993d5adcb.tar.bz2
AsmWriter: MDBasicType: Recognize DW_ATE in 'encoding'
llvm-svn: 229006
Diffstat (limited to 'llvm/lib/AsmParser/LLLexer.cpp')
-rw-r--r--llvm/lib/AsmParser/LLLexer.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp
index eb16608..64a67c0 100644
--- a/llvm/lib/AsmParser/LLLexer.cpp
+++ b/llvm/lib/AsmParser/LLLexer.cpp
@@ -738,11 +738,15 @@ lltok::Kind LLLexer::LexIdentifier() {
INSTKEYWORD(landingpad, LandingPad);
#undef INSTKEYWORD
- if (Len >= strlen("DW_TAG_") &&
- !memcmp(StartChar, "DW_TAG_", strlen("DW_TAG_"))) {
- StrVal.assign(StartChar, CurPtr);
- return lltok::DwarfTag;
- }
+#define DWKEYWORD(TYPE, TOKEN) \
+ if (Len >= strlen("DW_" #TYPE "_") && \
+ !memcmp(StartChar, "DW_" #TYPE "_", strlen("DW_" #TYPE "_"))) { \
+ StrVal.assign(StartChar, CurPtr); \
+ return lltok::TOKEN; \
+ }
+ DWKEYWORD(TAG, DwarfTag);
+ DWKEYWORD(ATE, DwarfAttEncoding);
+#undef DWKEYWORD
// Check for [us]0x[0-9A-Fa-f]+ which are Hexadecimal constant generated by
// the CFE to avoid forcing it to deal with 64-bit numbers.