summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorDavid Chisnall <csdavec@swan.ac.uk>2012-02-18 16:12:34 +0000
committerDavid Chisnall <csdavec@swan.ac.uk>2012-02-18 16:12:34 +0000
commit0867d9cfbcd9a23a026a72d82b8e3a5f6e088af6 (patch)
tree2adb040af70f53fe634319704bcc7a046a0f20aa /clang/lib/Frontend/InitPreprocessor.cpp
parente72fa2c11374a04d75d7e6c0fab6f595176b19a7 (diff)
downloadbcm5719-llvm-0867d9cfbcd9a23a026a72d82b8e3a5f6e088af6.tar.gz
bcm5719-llvm-0867d9cfbcd9a23a026a72d82b8e3a5f6e088af6.zip
Implement #pragma redefine_extname.
This fixes PR5172 and allows clang to compile C++ programs on Solaris using the system headers. llvm-svn: 150881
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
-rw-r--r--clang/lib/Frontend/InitPreprocessor.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp
index f0cf7f49140..504ef016012 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/lib/Frontend/InitPreprocessor.cpp
@@ -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.
OpenPOWER on IntegriCloud