[llvm] 2172b17 - Remove redundant word word in AsmParser DIFlag parsing
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 22 17:53:09 PST 2022
Author: David Blaikie
Date: 2022-02-22T17:50:13-08:00
New Revision: 2172b1758d9a943c7cd0b6fd886c07b7f7bd47c7
URL: https://github.com/llvm/llvm-project/commit/2172b1758d9a943c7cd0b6fd886c07b7f7bd47c7
DIFF: https://github.com/llvm/llvm-project/commit/2172b1758d9a943c7cd0b6fd886c07b7f7bd47c7.diff
LOG: Remove redundant word word in AsmParser DIFlag parsing
Added:
llvm/test/Assembler/invalid-diflag-bad.ll
Modified:
llvm/lib/AsmParser/LLParser.cpp
Removed:
################################################################################
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 769601c7e6338..adeb3ba15a92a 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -4167,8 +4167,8 @@ bool LLParser::parseMDField(LocTy Loc, StringRef Name, DIFlagField &Result) {
Val = DINode::getFlag(Lex.getStrVal());
if (!Val)
- return tokError(Twine("invalid debug info flag flag '") +
- Lex.getStrVal() + "'");
+ return tokError(Twine("invalid debug info flag '") + Lex.getStrVal() +
+ "'");
Lex.Lex();
return false;
};
diff --git a/llvm/test/Assembler/invalid-diflag-bad.ll b/llvm/test/Assembler/invalid-diflag-bad.ll
new file mode 100644
index 0000000000000..cde59f6ce6674
--- /dev/null
+++ b/llvm/test/Assembler/invalid-diflag-bad.ll
@@ -0,0 +1,4 @@
+; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
+
+; CHECK: <stdin>:[[@LINE+1]]:27: error: invalid debug info flag 'DIFlagUnknown'
+!0 = !DISubprogram(flags: DIFlagUnknown)
More information about the llvm-commits
mailing list