aboutsummaryrefslogtreecommitdiff
path: root/lib/AsmParser/LLLexer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AsmParser/LLLexer.cpp')
-rw-r--r--lib/AsmParser/LLLexer.cpp28
1 files changed, 25 insertions, 3 deletions
diff --git a/lib/AsmParser/LLLexer.cpp b/lib/AsmParser/LLLexer.cpp
index 26eca230bb31..507e7e76ecd2 100644
--- a/lib/AsmParser/LLLexer.cpp
+++ b/lib/AsmParser/LLLexer.cpp
@@ -513,6 +513,7 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(hidden);
KEYWORD(protected);
KEYWORD(unnamed_addr);
+ KEYWORD(local_unnamed_addr);
KEYWORD(externally_initialized);
KEYWORD(extern_weak);
KEYWORD(external);
@@ -533,6 +534,7 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(notail);
KEYWORD(target);
KEYWORD(triple);
+ KEYWORD(source_filename);
KEYWORD(unwind);
KEYWORD(deplibs); // FIXME: Remove in 4.0.
KEYWORD(datalayout);
@@ -559,6 +561,7 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(addrspace);
KEYWORD(section);
KEYWORD(alias);
+ KEYWORD(ifunc);
KEYWORD(module);
KEYWORD(asm);
KEYWORD(sideeffect);
@@ -579,6 +582,8 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(arm_aapcscc);
KEYWORD(arm_aapcs_vfpcc);
KEYWORD(msp430_intrcc);
+ KEYWORD(avr_intrcc);
+ KEYWORD(avr_signalcc);
KEYWORD(ptx_kernel);
KEYWORD(ptx_device);
KEYWORD(spir_kernel);
@@ -587,6 +592,7 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(x86_64_sysvcc);
KEYWORD(x86_64_win64cc);
KEYWORD(webkit_jscc);
+ KEYWORD(swiftcc);
KEYWORD(anyregcc);
KEYWORD(preserve_mostcc);
KEYWORD(preserve_allcc);
@@ -595,6 +601,11 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(hhvmcc);
KEYWORD(hhvm_ccc);
KEYWORD(cxx_fast_tlscc);
+ KEYWORD(amdgpu_vs);
+ KEYWORD(amdgpu_gs);
+ KEYWORD(amdgpu_ps);
+ KEYWORD(amdgpu_cs);
+ KEYWORD(amdgpu_kernel);
KEYWORD(cc);
KEYWORD(c);
@@ -602,6 +613,7 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(attributes);
KEYWORD(alwaysinline);
+ KEYWORD(allocsize);
KEYWORD(argmemonly);
KEYWORD(builtin);
KEYWORD(byval);
@@ -645,7 +657,10 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(sanitize_address);
KEYWORD(sanitize_thread);
KEYWORD(sanitize_memory);
+ KEYWORD(swifterror);
+ KEYWORD(swiftself);
KEYWORD(uwtable);
+ KEYWORD(writeonly);
KEYWORD(zeroext);
KEYWORD(type);
@@ -780,14 +795,19 @@ lltok::Kind LLLexer::LexIdentifier() {
DWKEYWORD(ATE, DwarfAttEncoding);
DWKEYWORD(VIRTUALITY, DwarfVirtuality);
DWKEYWORD(LANG, DwarfLang);
+ DWKEYWORD(CC, DwarfCC);
DWKEYWORD(OP, DwarfOp);
DWKEYWORD(MACINFO, DwarfMacinfo);
#undef DWKEYWORD
-
if (Keyword.startswith("DIFlag")) {
StrVal.assign(Keyword.begin(), Keyword.end());
return lltok::DIFlag;
}
+ if (Keyword == "NoDebug" || Keyword == "FullDebug" ||
+ Keyword == "LineTablesOnly") {
+ StrVal.assign(Keyword.begin(), Keyword.end());
+ return lltok::EmissionKind;
+ }
// 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.
@@ -941,7 +961,8 @@ lltok::Kind LLLexer::LexDigitOrNegative() {
}
}
- APFloatVal = APFloat(std::atof(TokStart));
+ APFloatVal = APFloat(APFloat::IEEEdouble,
+ StringRef(TokStart, CurPtr - TokStart));
return lltok::APFloat;
}
@@ -977,6 +998,7 @@ lltok::Kind LLLexer::LexPositive() {
}
}
- APFloatVal = APFloat(std::atof(TokStart));
+ APFloatVal = APFloat(APFloat::IEEEdouble,
+ StringRef(TokStart, CurPtr - TokStart));
return lltok::APFloat;
}