diff options
author | Weiming Zhao <weimingz@codeaurora.org> | 2016-12-05 23:55:13 +0000 |
---|---|---|
committer | Weiming Zhao <weimingz@codeaurora.org> | 2016-12-05 23:55:13 +0000 |
commit | b38cfced8d6737b5652f9c6240b05cf8c3c6e677 (patch) | |
tree | d2b28bcc4b28b35626fd265d043db2343349ff86 /llvm/utils/TableGen/AsmMatcherEmitter.cpp | |
parent | ca648c9787c7c82ddb9b1c13353df46d085fa366 (diff) | |
download | bcm5719-llvm-b38cfced8d6737b5652f9c6240b05cf8c3c6e677.tar.gz bcm5719-llvm-b38cfced8d6737b5652f9c6240b05cf8c3c6e677.zip |
Summary: Currently there is no way to disable deprecated warning from asm like this
clang -target arm deprecated-asm.s -c
deprecated-asm.s:30:9: warning: use of SP or PC in the list is deprecated
stmia r4!, {r12-r14}
We have to have an option what can disable it.
Patched by Yin Ma!
Reviewers: joey, echristo, weimingz
Subscribers: llvm-commits, aemerson
Differential Revision: https://reviews.llvm.org/D27219
llvm-svn: 288734
Diffstat (limited to 'llvm/utils/TableGen/AsmMatcherEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/AsmMatcherEmitter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp index 3719d884ad5..1272d2b9f28 100644 --- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp +++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp @@ -3199,7 +3199,9 @@ void AsmMatcherEmitter::run(raw_ostream &OS) { if (HasDeprecation) { OS << " std::string Info;\n"; - OS << " if (MII.get(Inst.getOpcode()).getDeprecatedInfo(Inst, getSTI(), Info)) {\n"; + OS << " if (!getParser().getTargetParser().\n"; + OS << " getTargetOptions().MCNoDeprecatedWarn &&\n"; + OS << " MII.get(Inst.getOpcode()).getDeprecatedInfo(Inst, getSTI(), Info)) {\n"; OS << " SMLoc Loc = ((" << Target.getName() << "Operand&)*Operands[0]).getStartLoc();\n"; OS << " getParser().Warning(Loc, Info, None);\n"; |