From eba9a6e08fcbd16c8f52b9977475e349073bcf8c Mon Sep 17 00:00:00 2001 From: Anastasia Stulova Date: Thu, 9 May 2019 10:25:45 +0000 Subject: [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 --- clang/lib/Frontend/CompilerInvocation.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') 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 && -- cgit v1.1