[PATCH] D51446: [OpenMP][bugfix] Add missing macros for Power
Gheorghe-Teodor Bercea via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 29 11:09:19 PDT 2018
gtbercea created this revision.
gtbercea added reviewers: ABataev, Hahnfeld, caomhin.
Herald added subscribers: cfe-commits, guansong.
Add missing macros when the auxiliary triple points to the PPC architecture.
Repository:
rC Clang
https://reviews.llvm.org/D51446
Files:
lib/Frontend/InitPreprocessor.cpp
Index: lib/Frontend/InitPreprocessor.cpp
===================================================================
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -1113,10 +1113,18 @@
Builder.defineMacro("__x86_64__");
break;
case llvm::Triple::ppc64:
+ if (AuxTI.getLongDoubleWidth() == 128) {
+ Builder.defineMacro("__LONG_DOUBLE_128__");
+ Builder.defineMacro("__LONGDOUBLE128");
+ }
Builder.defineMacro("__powerpc64__");
Builder.defineMacro("_CALL_ELF", "1");
break;
case llvm::Triple::ppc64le:
+ if (AuxTI.getLongDoubleWidth() == 128) {
+ Builder.defineMacro("__LONG_DOUBLE_128__");
+ Builder.defineMacro("__LONGDOUBLE128");
+ }
Builder.defineMacro("__powerpc64__");
Builder.defineMacro("_CALL_ELF", "2");
break;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51446.163144.patch
Type: text/x-patch
Size: 821 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180829/568e14a1/attachment.bin>
More information about the cfe-commits
mailing list