diff options
author | Joey Gouly <joey.gouly@arm.com> | 2013-09-12 10:28:05 +0000 |
---|---|---|
committer | Joey Gouly <joey.gouly@arm.com> | 2013-09-12 10:28:05 +0000 |
commit | 715d98d657491b3fb8ea0e14643e9801b2f9628c (patch) | |
tree | d4d597bcfaee4367d1c0cbfebcc1dbb7274db0ed /lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp | |
parent | f9d2d2dc89f0c2d39f597038ee723fb9c9af91da (diff) | |
download | external_llvm-715d98d657491b3fb8ea0e14643e9801b2f9628c.zip external_llvm-715d98d657491b3fb8ea0e14643e9801b2f9628c.tar.gz external_llvm-715d98d657491b3fb8ea0e14643e9801b2f9628c.tar.bz2 |
Add an instruction deprecation feature to TableGen.
The 'Deprecated' class allows you to specify a SubtargetFeature that the
instruction is deprecated on.
The 'ComplexDeprecationPredicate' class allows you to define a custom
predicate that is called to check for deprecation.
For example:
ComplexDeprecationPredicate<"MCR">
would mean you would have to define the following function:
bool getMCRDeprecationInfo(MCInst &MI, MCSubtargetInfo &STI,
std::string &Info)
Which returns 'false' for not deprecated, and 'true' for deprecated
and store the warning message in 'Info'.
The MCTargetAsmParser constructor was chaned to take an extra argument of
the MCInstrInfo class, so out-of-tree targets will need to be changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190598 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp')
-rw-r--r-- | lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp index 68d4be4..f7e9c6f 100644 --- a/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp +++ b/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp @@ -54,8 +54,9 @@ public: #include "AArch64GenAsmMatcher.inc" }; - AArch64AsmParser(MCSubtargetInfo &_STI, MCAsmParser &_Parser) - : MCTargetAsmParser(), STI(_STI), Parser(_Parser) { + AArch64AsmParser(MCSubtargetInfo &_STI, MCAsmParser &_Parser, + const MCInstrInfo &MII) + : MCTargetAsmParser(), STI(_STI), Parser(_Parser) { MCAsmParserExtension::Initialize(_Parser); // Initialize the set of available features. |