summaryrefslogtreecommitdiffstats
path: root/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-06-06 08:21:31 +0000
committered <ed@FreeBSD.org>2009-06-06 08:21:31 +0000
commit265c92560db8af7e64dc328cb612076086a62bd1 (patch)
tree06d57bb7679a2140aef96db7105a0bd5f16a4358 /lib/Frontend/InitPreprocessor.cpp
parent9e262ca77e924f9d84a864b031a1b931d03c5e38 (diff)
downloadFreeBSD-src-265c92560db8af7e64dc328cb612076086a62bd1.zip
FreeBSD-src-265c92560db8af7e64dc328cb612076086a62bd1.tar.gz
Import clang, at r72995.
Diffstat (limited to 'lib/Frontend/InitPreprocessor.cpp')
-rw-r--r--lib/Frontend/InitPreprocessor.cpp11
1 files changed, 3 insertions, 8 deletions
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<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
OpenPOWER on IntegriCloud