summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRParser/MILexer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser/MILexer.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRParser/MILexer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MILexer.cpp b/llvm/lib/CodeGen/MIRParser/MILexer.cpp
index 9ec12ee2427..ee4d59ddcaa 100644
--- a/llvm/lib/CodeGen/MIRParser/MILexer.cpp
+++ b/llvm/lib/CodeGen/MIRParser/MILexer.cpp
@@ -211,6 +211,10 @@ static Cursor maybeLexFixedStackObject(Cursor C, MIToken &Token) {
return maybeLexIndex(C, Token, "%fixed-stack.", MIToken::FixedStackObject);
}
+static Cursor maybeLexConstantPoolItem(Cursor C, MIToken &Token) {
+ return maybeLexIndex(C, Token, "%const.", MIToken::ConstantPoolItem);
+}
+
static Cursor lexVirtualRegister(Cursor C, MIToken &Token) {
auto Range = C;
C.advance(); // Skip '%'
@@ -321,6 +325,8 @@ StringRef llvm::lexMIToken(
return R.remaining();
if (Cursor R = maybeLexFixedStackObject(C, Token))
return R.remaining();
+ if (Cursor R = maybeLexConstantPoolItem(C, Token))
+ return R.remaining();
if (Cursor R = maybeLexRegister(C, Token))
return R.remaining();
if (Cursor R = maybeLexGlobalValue(C, Token, ErrorCallback))
OpenPOWER on IntegriCloud