diff options
author | Chris Lattner <sabre@nondot.org> | 2008-09-30 00:48:48 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-09-30 00:48:48 +0000 |
commit | 048dd943fc22a3ee60180d6992d744106c4c100a (patch) | |
tree | 2cb28060e2668925d0caac0b35682979630b3177 | |
parent | 71af22964535d66b656b4c2de3551bf770e4164d (diff) |
define __PASCAL_STRINGS__ whenever -fpascal-strings is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56824 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Basic/Targets.cpp | 5 | ||||
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 6139f9d9e0..2625da2e4d 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -42,10 +42,7 @@ static void getSolarisDefines(std::vector<char> &Defs) { static void getDarwinDefines(std::vector<char> &Defs) { Define(Defs, "__APPLE__"); Define(Defs, "__MACH__"); - Define(Defs, "__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__=1050"); - - if (0) // darwin_pascal_strings - Define(Defs, "__PASCAL_STRINGS__"); + Define(Defs, "__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__", "1050"); } static void getDragonFlyDefines(std::vector<char> &Defs) { diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 3f477c296c..458eca640a 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -414,6 +414,10 @@ static void InitializePredefinedMacros(Preprocessor &PP, if (PP.getLangOptions().ObjC2) DefineBuiltinMacro(Buf, "OBJC_NEW_PROPERTIES"); + if (PP.getLangOptions().PascalStrings) + DefineBuiltinMacro(Buf, "__PASCAL_STRINGS__"); + + // Add __builtin_va_list typedef. { const char *VAList = PP.getTargetInfo().getVAListDeclaration(); |