[PATCH] D51446: [OpenMP][bugfix] Add missing macros for Power
Jonas Hahnfeld via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 30 04:29:00 PDT 2018
Hahnfeld requested changes to this revision.
Hahnfeld added a comment.
This revision now requires changes to proceed.
Please also update the test.
================
Comment at: lib/Frontend/InitPreprocessor.cpp:1115-1130
case llvm::Triple::ppc64:
+ if (AuxTI.getLongDoubleWidth() == 128) {
+ Builder.defineMacro("__LONG_DOUBLE_128__");
+ Builder.defineMacro("__LONGDOUBLE128");
+ }
Builder.defineMacro("__powerpc64__");
Builder.defineMacro("_CALL_ELF", "1");
----------------
I'd suggest to merge these two:
```lang=c++
case llvm::Triple::ppc64:
case llvm::Triple::ppc64le:
Builder.defineMacro("__powerpc64__");
StringRef ABI = AuxTI.getABI();
// Set _CALL_ELF macro needed for gnu/stubs.h
if (ABI == "elfv1" || ABI == "elfv1-qpx")
Builder.defineMacro("_CALL_ELF", "1");
if (ABI == "elfv2")
Builder.defineMacro("_CALL_ELF", "2");
// TODO: Add comment where this is needed and for what reason.
if (AuxTI.getLongDoubleWidth() == 128) {
Builder.defineMacro("__LONG_DOUBLE_128__");
Builder.defineMacro("__LONGDOUBLE128");
}
break;
Repository:
rC Clang
https://reviews.llvm.org/D51446
More information about the cfe-commits
mailing list