[PATCH] D51312: [OpenMP][NVPTX] Use appropriate _CALL_ELF macro when offloading
Gheorghe-Teodor Bercea via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 27 09:08:42 PDT 2018
gtbercea created this revision.
gtbercea added reviewers: Hahnfeld, ABataev, caomhin.
Herald added subscribers: cfe-commits, guansong.
When offloading to a device and using the powerpc64le version of the auxiliary triple, the _CALL_ELF macro is not set correctly to 2 resulting in the attempt to include a header that does not exist. This patch fixes this problem.
Repository:
rC Clang
https://reviews.llvm.org/D51312
Files:
lib/Frontend/InitPreprocessor.cpp
Index: lib/Frontend/InitPreprocessor.cpp
===================================================================
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -1112,8 +1112,12 @@
Builder.defineMacro("__x86_64__");
break;
case llvm::Triple::ppc64:
+ Builder.defineMacro("__powerpc64__");
+ Builder.defineMacro("_CALL_ELF", "1");
+ break;
case llvm::Triple::ppc64le:
Builder.defineMacro("__powerpc64__");
+ Builder.defineMacro("_CALL_ELF", "2");
break;
default:
break;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51312.162691.patch
Type: text/x-patch
Size: 542 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180827/76d16f0e/attachment.bin>
More information about the cfe-commits
mailing list