[PATCH] D112993: Don't emit "deprecated instruction in IT block" warning if requested
Yi Kong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 2 02:27:18 PDT 2021
kongyi created this revision.
kongyi added a reviewer: kristof.beyls.
Herald added a subscriber: hiraditya.
kongyi requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Also fixed formatting in AsmMatcherEmitter because it was confusing.
https://reviews.llvm.org/D112993
Files:
llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
llvm/utils/TableGen/AsmMatcherEmitter.cpp
Index: llvm/utils/TableGen/AsmMatcherEmitter.cpp
===================================================================
--- llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -3924,8 +3924,7 @@
if (HasDeprecation) {
OS << " std::string Info;\n";
- OS << " if (!getParser().getTargetParser().\n";
- OS << " getTargetOptions().MCNoDeprecatedWarn &&\n";
+ OS << " if (!getParser().getTargetParser().getTargetOptions().MCNoDeprecatedWarn &&\n";
OS << " MII.getDeprecatedInfo(Inst, getSTI(), Info)) {\n";
OS << " SMLoc Loc = ((" << Target.getName()
<< "Operand &)*Operands[0]).getStartLoc();\n";
Index: llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
===================================================================
--- llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -10961,7 +10961,7 @@
// Only after the instruction is fully processed, we can validate it
if (wasInITBlock && hasV8Ops() && isThumb() &&
- !isV8EligibleForIT(&Inst)) {
+ !isV8EligibleForIT(&Inst) && !getTargetOptions().MCNoDeprecatedWarn) {
Warning(IDLoc, "deprecated instruction in IT block");
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112993.384011.patch
Type: text/x-patch
Size: 1274 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211102/f0863039/attachment.bin>
More information about the llvm-commits
mailing list