Implement #pragma redefine_extname.

This fixes PR5172 and allows clang to compile C++ programs on Solaris using the system headers.

llvm-svn: 150881
This commit is contained in:
David Chisnall
2012-02-18 16:12:34 +00:00
parent e72fa2c113
commit 0867d9cfbc
8 changed files with 119 additions and 0 deletions

View File

@@ -333,6 +333,9 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
Builder.defineMacro("__ATOMIC_ACQ_REL", "4");
Builder.defineMacro("__ATOMIC_SEQ_CST", "5");
// Support for #pragma redefine_extname (Sun compatibility)
Builder.defineMacro("__PRAGMA_REDEFINE_EXTNAME", "1");
// As sad as it is, enough software depends on the __VERSION__ for version
// checks that it is necessary to report 4.2.1 (the base GCC version we claim
// compatibility with) first.