aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorAnastasia Stulova <anastasia.stulova@arm.com>2019-05-09 10:25:45 +0000
committerAnastasia Stulova <anastasia.stulova@arm.com>2019-05-09 10:25:45 +0000
commiteba9a6e08fcbd16c8f52b9977475e349073bcf8c (patch)
treefb48586c25c2bdf91ed47978877a125b414163cd /clang/lib/Frontend/CompilerInvocation.cpp
parent543913c3b41f7d8dcede4f446ffcd2dce496a084 (diff)
downloadllvm-eba9a6e08fcbd16c8f52b9977475e349073bcf8c.zip
llvm-eba9a6e08fcbd16c8f52b9977475e349073bcf8c.tar.gz
llvm-eba9a6e08fcbd16c8f52b9977475e349073bcf8c.tar.bz2
[SPIR] Simplified target checking.
Switched to Triple::isSPIR() helper to simplify code. Patch by kpet (Kevin Petit)! Differential revision: https://reviews.llvm.org/D61639 llvm-svn: 360325
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 12846b1..ca95dec 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -3349,10 +3349,8 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
Res.getFrontendOpts().ProgramAction);
// Turn on -Wspir-compat for SPIR target.
- auto Arch = T.getArch();
- if (Arch == llvm::Triple::spir || Arch == llvm::Triple::spir64) {
+ if (T.isSPIR())
Res.getDiagnosticOpts().Warnings.push_back("spir-compat");
- }
// If sanitizer is enabled, disable OPT_ffine_grained_bitfield_accesses.
if (Res.getCodeGenOpts().FineGrainedBitfieldAccesses &&