From: Hans Wennborg Date: Sat, 11 Apr 2015 11:44:44 +0000 (+0000) Subject: clang-cl: support -fmacro-backtrace-limit X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b102ed754fd8905ac6b4f4305aa5a11892723126;p=clang clang-cl: support -fmacro-backtrace-limit Also fix the test for "core options" to actually fail in case an option isn't supported. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234684 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 0992e9e509..bc23b9a7e0 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -627,7 +627,7 @@ def flto_EQ : Joined<["-"], "flto=">, Group, Group; def fno_lto : Flag<["-"], "fno-lto">, Group; def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">, - Group; + Group, Flags<[DriverOption, CoreOption]>; def fmerge_all_constants : Flag<["-"], "fmerge-all-constants">, Group; def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group; def fms_extensions : Flag<["-"], "fms-extensions">, Group, Flags<[CC1Option]>, diff --git a/test/Driver/cl-options.c b/test/Driver/cl-options.c index 4a82544d9e..d3f0f7ab58 100644 --- a/test/Driver/cl-options.c +++ b/test/Driver/cl-options.c @@ -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() { }