diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-04-23 19:48:40 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-04-23 19:48:40 +0000 |
commit | f8c247d247f9f7ab2bf4965677e6d056711c99d5 (patch) | |
tree | 54999eae5d265dd8ffb3c5542fdd977dced511df /lib/Frontend/InitPreprocessor.cpp | |
parent | 89ebaed91cca7fd296ec7804e4e9fb68949c1d0e (diff) |
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
Diffstat (limited to 'lib/Frontend/InitPreprocessor.cpp')
-rw-r--r-- | lib/Frontend/InitPreprocessor.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp index 802d66ff0e..58379d3459 100644 --- a/lib/Frontend/InitPreprocessor.cpp +++ b/lib/Frontend/InitPreprocessor.cpp @@ -318,9 +318,10 @@ static void InitializePredefinedMacros(const TargetInfo &TI, 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) |