diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-04-07 22:13:21 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-04-07 22:13:21 +0000 |
commit | d573d26e1abcce24c31ece3d6f7af158db569e4c (patch) | |
tree | 9f2f5d870a8c041f092fb9fe02b9df5ede653b21 /tools/clang-cc/clang-cc.cpp | |
parent | 6e460ff03f984d34d6f3ba7f191380b823b6062f (diff) |
Driver: Fix forwarding of -{std,ansi,trigraphs} when there are
multiple instances of an option.
Also, removed direct -ansi support from clang-cc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68558 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/clang-cc/clang-cc.cpp')
-rw-r--r-- | tools/clang-cc/clang-cc.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/tools/clang-cc/clang-cc.cpp b/tools/clang-cc/clang-cc.cpp index 9260afe4b7..2843848f31 100644 --- a/tools/clang-cc/clang-cc.cpp +++ b/tools/clang-cc/clang-cc.cpp @@ -585,9 +585,6 @@ NeXTRuntime("fnext-runtime", static llvm::cl::opt<bool> Trigraphs("trigraphs", llvm::cl::desc("Process trigraph sequences.")); -static llvm::cl::opt<bool> -Ansi("ansi", llvm::cl::desc("Equivalent to specifying -std=c89.")); - static llvm::cl::list<std::string> TargetFeatures("mattr", llvm::cl::CommaSeparated, llvm::cl::desc("Target specific attributes (-mattr=help for details)")); @@ -653,9 +650,6 @@ static void InitializeLanguageStandard(LangOptions &Options, LangKind LK, } } - if (Ansi) // "The -ansi option is equivalent to -std=c89." - LangStd = lang_c89; - if (LangStd == lang_unspecified) { // Based on the base language, pick one. switch (LK) { @@ -719,8 +713,8 @@ static void InitializeLanguageStandard(LangOptions &Options, LangKind LK, else Options.ImplicitInt = 0; - // Mimicing gcc's behavior, trigraphs are only enabled if -trigraphs or -ansi - // is specified, or -std is set to a conforming mode. + // Mimicing gcc's behavior, trigraphs are only enabled if -trigraphs + // is specified, or -std is set to a conforming mode. Options.Trigraphs = !Options.GNUMode; if (Trigraphs.getPosition()) Options.Trigraphs = Trigraphs; // Command line option wins if specified. |