diff options
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
-rw-r--r-- | clang/lib/Frontend/InitPreprocessor.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index ea5b48c..42ba920 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -511,16 +511,12 @@ static void InitializePredefinedMacros(const TargetInfo &TI, #define TOSTR(X) TOSTR2(X) Builder.defineMacro("__clang_major__", TOSTR(CLANG_VERSION_MAJOR)); Builder.defineMacro("__clang_minor__", TOSTR(CLANG_VERSION_MINOR)); -#ifdef CLANG_VERSION_PATCHLEVEL Builder.defineMacro("__clang_patchlevel__", TOSTR(CLANG_VERSION_PATCHLEVEL)); -#else - Builder.defineMacro("__clang_patchlevel__", "0"); -#endif +#undef TOSTR +#undef TOSTR2 Builder.defineMacro("__clang_version__", "\"" CLANG_VERSION_STRING " " + getClangFullRepositoryVersion() + "\""); -#undef TOSTR -#undef TOSTR2 if (!LangOpts.MSVCCompat) { // Currently claim to be compatible with GCC 4.2.1-5621, but only if we're // not compiling for MSVC compatibility |