diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2008-07-05 17:58:44 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2008-07-05 17:58:44 +0000 |
commit | 9b6de71b7df978dc41f240711bf98fe1b65c81f4 (patch) | |
tree | 8dccf60d6235230569787879d050b1e758263817 /clang/lib/Lex/Preprocessor.cpp | |
parent | a7c7c6b01147e6255d2e12ac16bc7066448a09cf (diff) | |
download | bcm5719-llvm-9b6de71b7df978dc41f240711bf98fe1b65c81f4.tar.gz bcm5719-llvm-9b6de71b7df978dc41f240711bf98fe1b65c81f4.zip |
predefine the macro linux when compiled on a linux system. this fixes the build of libtidy
llvm-svn: 53145
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r-- | clang/lib/Lex/Preprocessor.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index 32ee8f0c817..577e64a5cfe 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/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) { |