aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/lib/AsmParser/LLLexer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/lib/AsmParser/LLLexer.cpp')
-rw-r--r--contrib/llvm/lib/AsmParser/LLLexer.cpp31
1 files changed, 26 insertions, 5 deletions
diff --git a/contrib/llvm/lib/AsmParser/LLLexer.cpp b/contrib/llvm/lib/AsmParser/LLLexer.cpp
index eab7ec819536..72d2357c2933 100644
--- a/contrib/llvm/lib/AsmParser/LLLexer.cpp
+++ b/contrib/llvm/lib/AsmParser/LLLexer.cpp
@@ -1,9 +1,8 @@
//===- LLLexer.cpp - Lexer for .ll Files ----------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
@@ -571,6 +570,7 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(align);
KEYWORD(addrspace);
KEYWORD(section);
+ KEYWORD(partition);
KEYWORD(alias);
KEYWORD(ifunc);
KEYWORD(module);
@@ -650,6 +650,7 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(nobuiltin);
KEYWORD(nocapture);
KEYWORD(noduplicate);
+ KEYWORD(nofree);
KEYWORD(noimplicitfloat);
KEYWORD(noinline);
KEYWORD(norecurse);
@@ -657,6 +658,7 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(nonnull);
KEYWORD(noredzone);
KEYWORD(noreturn);
+ KEYWORD(nosync);
KEYWORD(nocf_check);
KEYWORD(nounwind);
KEYWORD(optforfuzzing);
@@ -677,14 +679,17 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(shadowcallstack);
KEYWORD(sanitize_address);
KEYWORD(sanitize_hwaddress);
+ KEYWORD(sanitize_memtag);
KEYWORD(sanitize_thread);
KEYWORD(sanitize_memory);
KEYWORD(speculative_load_hardening);
KEYWORD(swifterror);
KEYWORD(swiftself);
KEYWORD(uwtable);
+ KEYWORD(willreturn);
KEYWORD(writeonly);
KEYWORD(zeroext);
+ KEYWORD(immarg);
KEYWORD(type);
KEYWORD(opaque);
@@ -706,6 +711,7 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(xchg); KEYWORD(nand); KEYWORD(max); KEYWORD(min); KEYWORD(umax);
KEYWORD(umin);
+ KEYWORD(vscale);
KEYWORD(x);
KEYWORD(blockaddress);
@@ -733,6 +739,7 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(notEligibleToImport);
KEYWORD(live);
KEYWORD(dsoLocal);
+ KEYWORD(canAutoHide);
KEYWORD(function);
KEYWORD(insts);
KEYWORD(funcFlags);
@@ -749,6 +756,8 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(critical);
KEYWORD(relbf);
KEYWORD(variable);
+ KEYWORD(vTableFuncs);
+ KEYWORD(virtFunc);
KEYWORD(aliasee);
KEYWORD(refs);
KEYWORD(typeIdInfo);
@@ -761,6 +770,7 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(offset);
KEYWORD(args);
KEYWORD(typeid);
+ KEYWORD(typeidCompatibleVTable);
KEYWORD(summary);
KEYWORD(typeTestRes);
KEYWORD(kind);
@@ -859,6 +869,7 @@ lltok::Kind LLLexer::LexIdentifier() {
INSTKEYWORD(invoke, Invoke);
INSTKEYWORD(resume, Resume);
INSTKEYWORD(unreachable, Unreachable);
+ INSTKEYWORD(callbr, CallBr);
INSTKEYWORD(alloca, Alloca);
INSTKEYWORD(load, Load);
@@ -1047,7 +1058,17 @@ lltok::Kind LLLexer::LexDigitOrNegative() {
for (; isdigit(static_cast<unsigned char>(CurPtr[0])); ++CurPtr)
/*empty*/;
- // Check to see if this really is a label afterall, e.g. "-1:".
+ // Check if this is a fully-numeric label:
+ if (isdigit(TokStart[0]) && CurPtr[0] == ':') {
+ uint64_t Val = atoull(TokStart, CurPtr);
+ ++CurPtr; // Skip the colon.
+ if ((unsigned)Val != Val)
+ Error("invalid value number (too large)!");
+ UIntVal = unsigned(Val);
+ return lltok::LabelID;
+ }
+
+ // Check to see if this really is a string label, e.g. "-1:".
if (isLabelChar(CurPtr[0]) || CurPtr[0] == ':') {
if (const char *End = isLabelTail(CurPtr)) {
StrVal.assign(TokStart, End-1);