summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2017-02-15 07:50:11 +0000
committerEric Christopher <echristo@gmail.com>2017-02-15 07:50:11 +0000
commit32ac5e41ef957ed8ac497ebfbf84b61ee95be9a2 (patch)
tree698a9bb5a3fe7b35ef84f8c4f1d8c588146e436d /clang/lib/Basic
parentfbc7805e252ef02813e00b63702e5726b1848cbc (diff)
downloadbcm5719-llvm-32ac5e41ef957ed8ac497ebfbf84b61ee95be9a2.tar.gz
bcm5719-llvm-32ac5e41ef957ed8ac497ebfbf84b61ee95be9a2.zip
Add a definition for __STRUCT_PARM_ALIGN__ for elfv2 and 64-bit darwin platforms to match what other compilers produce.
llvm-svn: 295156
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r--clang/lib/Basic/Targets.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index 2ccb45902e1..647b14e16d1 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -1232,6 +1232,11 @@ void PPCTargetInfo::getTargetDefines(const LangOptions &Opts,
if (LongDoubleWidth == 128)
Builder.defineMacro("__LONG_DOUBLE_128__");
+ // Define this for elfv2 (64-bit only) or 64-bit darwin.
+ if (ABI == "elfv2" ||
+ (getTriple().getOS() == llvm::Triple::Darwin && PointerWidth == 64))
+ Builder.defineMacro("__STRUCT_PARM_ALIGN__", "16");
+
if (Opts.AltiVec) {
Builder.defineMacro("__VEC__", "10206");
Builder.defineMacro("__ALTIVEC__");
OpenPOWER on IntegriCloud