diff options
Diffstat (limited to 'lib/Frontend/InitPreprocessor.cpp')
-rw-r--r-- | lib/Frontend/InitPreprocessor.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp index e3a45d42cf550..01729fad5e721 100644 --- a/lib/Frontend/InitPreprocessor.cpp +++ b/lib/Frontend/InitPreprocessor.cpp @@ -23,8 +23,8 @@ namespace clang { // Append a #define line to Buf for Macro. Macro should be of the form XXX, // in which case we emit "#define XXX 1" or "XXX=Y z W" in which case we emit // "#define XXX Y z W". To get a #define with no value, use "XXX=". -static void DefineBuiltinMacro(std::vector<char> &Buf, const char *Macro, - const char *Command = "#define ") { +static void DefineBuiltinMacro(std::vector<char> &Buf, const char *Macro) { + const char *Command = "#define "; Buf.insert(Buf.end(), Command, Command+strlen(Command)); if (const char *Equal = strchr(Macro, '=')) { // Turn the = into ' '. @@ -367,7 +367,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI, sprintf(MacroBuf, "__POINTER_WIDTH__=%d", (int)TI.getPointerWidth(0)); DefineBuiltinMacro(Buf, MacroBuf); - if (!TI.isCharSigned()) + if (!LangOpts.CharIsSigned) DefineBuiltinMacro(Buf, "__CHAR_UNSIGNED__"); // Define fixed-sized integer types for stdint.h @@ -403,11 +403,6 @@ static void InitializePredefinedMacros(const TargetInfo &TI, // command line options or something. DefineBuiltinMacro(Buf, "__FINITE_MATH_ONLY__=0"); - if (LangOpts.Static) - DefineBuiltinMacro(Buf, "__STATIC__=1"); - else - DefineBuiltinMacro(Buf, "__DYNAMIC__=1"); - if (LangOpts.GNUInline) DefineBuiltinMacro(Buf, "__GNUC_GNU_INLINE__=1"); else |