aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2008-07-05 17:58:44 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2008-07-05 17:58:44 +0000
commite8825aa06c88818c9e35b3411601540ea1ae9d4a (patch)
treeea891afe7d6f216b2f75ebde160024ae9da3bc8e /lib/Lex/Preprocessor.cpp
parent05f971a432fc4b1ce5b67e2ae375382acf7a728f (diff)
predefine the macro linux when compiled on a linux system. this fixes the build of libtidy
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53145 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r--lib/Lex/Preprocessor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index 32ee8f0c81..577e64a5cf 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -433,6 +433,11 @@ static void InitializePredefinedMacros(Preprocessor &PP,
DefineBuiltinMacro(Buf, "__FINITE_MATH_ONLY__=0");
DefineBuiltinMacro(Buf, "__NO_INLINE__=1");
DefineBuiltinMacro(Buf, "__PIC__=1");
+
+/* FIXME: this check should be moved to the configure process */
+#ifdef linux
+ DefineBuiltinMacro(Buf, "linux=1");
+#endif
if (PP.getLangOptions().CPlusPlus) {