Skip to content

Commit 7e38d88

Browse files
author
Artem Gindinson
authored
Fix conflict resolution for clang/lib/Frontend/InitPreprocessor.cpp
1 parent 6c799a5 commit 7e38d88

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

clang/lib/Frontend/InitPreprocessor.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,13 +1179,12 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
11791179
Builder.defineMacro("__SYCL_DEVICE_ONLY__", "1");
11801180
Builder.defineMacro("SYCL_EXTERNAL", "__attribute__((sycl_device))");
11811181

1182-
if (TI.getTriple().isNVPTX()) {
1183-
Builder.defineMacro("__SYCL_NVPTX__", "1");
1184-
}
1182+
const llvm::Triple &DeviceTriple = TI.getTriple();
1183+
if (DeviceTriple.isNVPTX())
1184+
Builder.defineMacro("__SYCL_NVPTX__", "1");
11851185

1186-
if (TI.getTriple().isAMDGCN()) {
1186+
if (DeviceTriple.isAMDGCN())
11871187
Builder.defineMacro("__SYCL_AMDGCN__", "1");
1188-
}
11891188
const llvm::Triple::SubArchType DeviceSubArch = DeviceTriple.getSubArch();
11901189
if (DeviceTriple.isSPIR() &&
11911190
DeviceSubArch != llvm::Triple::SPIRSubArch_fpga)

0 commit comments

Comments
 (0)