Move all of the logic for __DEPRECATED to the driver based on comments
from dgregor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130066 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index daaaad0..998ca8a 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -694,8 +694,8 @@
     Res.push_back("-funknown-anytype");
   if (Opts.DelayedTemplateParsing)
     Res.push_back("-fdelayed-template-parsing");
-  if (!Opts.Deprecated)
-    Res.push_back("-fno-deprecated-macro");
+  if (Opts.Deprecated)
+    Res.push_back("-fdeprecated-macro");
 }
 
 static void PreprocessorOptsToArgs(const PreprocessorOptions &Opts,
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp
index 802d66f..58379d3 100644
--- a/lib/Frontend/InitPreprocessor.cpp
+++ b/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)