diff options
author | Alexander Richardson <arichardson.kde@gmail.com> | 2018-06-25 16:49:20 +0000 |
---|---|---|
committer | Alexander Richardson <arichardson.kde@gmail.com> | 2018-06-25 16:49:20 +0000 |
commit | 85e200e934cf8bfedf01802b1a6e2b62d8222b83 (patch) | |
tree | e12b27f7af0565e448c0de884c161414df6cc646 /llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | |
parent | b4adc9110da2b22f15288cc79c245d1b4b32c12b (diff) | |
download | bcm5719-llvm-85e200e934cf8bfedf01802b1a6e2b62d8222b83.tar.gz bcm5719-llvm-85e200e934cf8bfedf01802b1a6e2b62d8222b83.zip |
Add Triple::isMIPS()/isMIPS32()/isMIPS64(). NFC
There are quite a few if statements that enumerate all these cases. It gets
even worse in our fork of LLVM where we also have a Triple::cheri (which
is mips64 + CHERI instructions) and we had to update all if statements that
check for Triple::mips64 to also handle Triple::cheri. This patch helps to
reduce our diff to upstream and should also make some checks more readable.
Reviewed By: atanasyan
Differential Revision: https://reviews.llvm.org/D48548
llvm-svn: 335493
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp index ce1ed3c0938..bb0e4379d1a 100644 --- a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp @@ -539,8 +539,7 @@ TransformedFunction DataFlowSanitizer::getCustomFunctionType(FunctionType *T) { bool DataFlowSanitizer::doInitialization(Module &M) { Triple TargetTriple(M.getTargetTriple()); bool IsX86_64 = TargetTriple.getArch() == Triple::x86_64; - bool IsMIPS64 = TargetTriple.getArch() == Triple::mips64 || - TargetTriple.getArch() == Triple::mips64el; + bool IsMIPS64 = TargetTriple.isMIPS64(); bool IsAArch64 = TargetTriple.getArch() == Triple::aarch64 || TargetTriple.getArch() == Triple::aarch64_be; |