From 265c92560db8af7e64dc328cb612076086a62bd1 Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 6 Jun 2009 08:21:31 +0000 Subject: Import clang, at r72995. --- lib/Frontend/InitPreprocessor.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'lib/Frontend/InitPreprocessor.cpp') diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp index e3a45d4..01729fa 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 &Buf, const char *Macro, - const char *Command = "#define ") { +static void DefineBuiltinMacro(std::vector &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 -- cgit v1.1