r234684 - clang-cl: support -fmacro-backtrace-limit
Hans Wennborg
hans at hanshq.net
Sat Apr 11 04:44:45 PDT 2015
Author: hans
Date: Sat Apr 11 06:44:44 2015
New Revision: 234684
URL: http://llvm.org/viewvc/llvm-project?rev=234684&view=rev
Log:
clang-cl: support -fmacro-backtrace-limit
Also fix the test for "core options" to actually fail
in case an option isn't supported.
Modified:
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/test/Driver/cl-options.c
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=234684&r1=234683&r2=234684&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Sat Apr 11 06:44:44 2015
@@ -627,7 +627,7 @@ def flto_EQ : Joined<["-"], "flto=">, Gr
def flto : Flag<["-"], "flto">, Group<f_Group>;
def fno_lto : Flag<["-"], "fno-lto">, Group<f_Group>;
def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">,
- Group<f_Group>;
+ Group<f_Group>, Flags<[DriverOption, CoreOption]>;
def fmerge_all_constants : Flag<["-"], "fmerge-all-constants">, Group<f_Group>;
def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group<f_Group>;
def fms_extensions : Flag<["-"], "fms-extensions">, Group<f_Group>, Flags<[CC1Option]>,
Modified: cfe/trunk/test/Driver/cl-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=234684&r1=234683&r2=234684&view=diff
==============================================================================
--- cfe/trunk/test/Driver/cl-options.c (original)
+++ cfe/trunk/test/Driver/cl-options.c Sat Apr 11 06:44:44 2015
@@ -343,7 +343,7 @@
// ThreadSafeStatics-NOT: "-fno-threadsafe-statics"
// Accept "core" clang options.
-// (/Zs is for syntax-only)
+// (/Zs is for syntax-only, -Werror makes it fail hard on unknown options)
// RUN: %clang_cl \
// RUN: --driver-mode=cl \
// RUN: -ferror-limit=10 \
@@ -351,8 +351,9 @@
// RUN: -fno-strict-aliasing \
// RUN: -fstrict-aliasing \
// RUN: -mllvm -disable-llvm-optzns \
-// RUN: -Wunused-variables \
-// RUN: /Zs -- %s 2>&1
+// RUN: -Wunused-variable \
+// RUN: -fmacro-backtrace-limit=0 \
+// RUN: -Werror /Zs -- %s 2>&1
void f() { }
More information about the cfe-commits
mailing list