Add some more required SPARC v9 predefined macros.

Solaris/AuroraUX only need __arch64__, the BSDs need the other variants.

llvm-svn: 180172
This commit is contained in:
Jakob Stoklund Olesen 2013-04-24 04:36:38 +00:00
parent 4e9fc023c6
commit f759989bcd
1 changed files with 9 additions and 0 deletions

View File

@ -4256,6 +4256,15 @@ public:
MacroBuilder &Builder) const { MacroBuilder &Builder) const {
SparcTargetInfo::getTargetDefines(Opts, Builder); SparcTargetInfo::getTargetDefines(Opts, Builder);
Builder.defineMacro("__sparcv9"); 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__");
}
} }
}; };