Move all of the logic for __DEPRECATED to the driver based on comments
from dgregor.
llvm-svn: 130066
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp
index 802d66f..58379d3 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/lib/Frontend/InitPreprocessor.cpp
@@ -318,9 +318,10 @@
if (LangOpts.SjLjExceptions)
Builder.defineMacro("__USING_SJLJ_EXCEPTIONS__");
+ if (LangOpts.Deprecated)
+ Builder.defineMacro("__DEPRECATED");
+
if (LangOpts.CPlusPlus) {
- if (LangOpts.Deprecated)
- Builder.defineMacro("__DEPRECATED");
Builder.defineMacro("__GNUG__", "4");
Builder.defineMacro("__GXX_WEAK__");
if (LangOpts.GNUMode)