aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2013-04-24 04:36:38 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2013-04-24 04:36:38 +0000
commit44f72d34a947c654f88ea212b7fe5834615bca11 (patch)
treea35c7af674b00cfa3e1aeed258cd09e90f1404ca
parentcaadc413a88e864e058a3bea832f42debd8ddef2 (diff)
Add some more required SPARC v9 predefined macros.
Solaris/AuroraUX only need __arch64__, the BSDs need the other variants. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180172 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Basic/Targets.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 96aba5c21b..df8df2128d 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -4256,6 +4256,15 @@ public:
MacroBuilder &Builder) const {
SparcTargetInfo::getTargetDefines(Opts, Builder);
Builder.defineMacro("__sparcv9");
+ Builder.defineMacro("__arch64__");
+ // Solaris and its derivative AuroraUX don't need these variants, but the
+ // BSDs do.
+ if (getTriple().getOS() != llvm::Triple::Solaris &&
+ getTriple().getOS() != llvm::Triple::AuroraUX) {
+ Builder.defineMacro("__sparc64__");
+ Builder.defineMacro("__sparc_v9__");
+ Builder.defineMacro("__sparcv9__");
+ }
}
};