summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.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/CodeGen/CodeGenModule.cpp
parent543913c3b41f7d8dcede4f446ffcd2dce496a084 (diff)
downloadbcm5719-llvm-eba9a6e08fcbd16c8f52b9977475e349073bcf8c.tar.gz
bcm5719-llvm-eba9a6e08fcbd16c8f52b9977475e349073bcf8c.zip
[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/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 40e18e6e350..a1e4511ada6 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -539,8 +539,7 @@ void CodeGenModule::Release() {
if (LangOpts.OpenCL) {
EmitOpenCLMetadata();
// Emit SPIR version.
- if (getTriple().getArch() == llvm::Triple::spir ||
- getTriple().getArch() == llvm::Triple::spir64) {
+ if (getTriple().isSPIR()) {
// SPIR v2.0 s2.12 - The SPIR version used by the module is stored in the
// opencl.spir.version named metadata.
llvm::Metadata *SPIRVerElts[] = {
OpenPOWER on IntegriCloud