forked from OSchip/llvm-project
[Driver] Fix -f[no-]unwind-tables -Wunused-command-line-argument after 4388b56d52
This commit is contained in:
parent
1cbf44bd50
commit
669e508772
|
@ -5469,13 +5469,14 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
auto SanitizeArgs = TC.getSanitizerArgs(Args);
|
||||
auto UnwindTables = TC.getDefaultUnwindTableLevel(Args);
|
||||
|
||||
const bool HasSyncUnwindTables = Args.hasFlag(
|
||||
options::OPT_funwind_tables, options::OPT_fno_unwind_tables, false);
|
||||
if (Args.hasFlag(options::OPT_fasynchronous_unwind_tables,
|
||||
options::OPT_fno_asynchronous_unwind_tables,
|
||||
SanitizeArgs.needsUnwindTables()) &&
|
||||
!Freestanding)
|
||||
UnwindTables = ToolChain::UnwindTableLevel::Asynchronous;
|
||||
else if (Args.hasFlag(options::OPT_funwind_tables,
|
||||
options::OPT_fno_unwind_tables, false))
|
||||
else if (HasSyncUnwindTables)
|
||||
UnwindTables = ToolChain::UnwindTableLevel::Synchronous;
|
||||
else if (Args.hasFlag(options::OPT_fno_unwind_tables,
|
||||
options::OPT_fno_asynchronous_unwind_tables,
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// I386: "-o"
|
||||
// I386: clang-translation
|
||||
|
||||
// RUN: %clang -target i386-unknown-unknown -### -S %s -fasynchronous-unwind-tables -fno-unwind-tables 2>&1 | FileCheck --check-prefix=UNWIND-TABLES %s
|
||||
// RUN: %clang -target i386-unknown-unknown -### -S %s -fasynchronous-unwind-tables -fno-unwind-tables 2>&1 | FileCheck --check-prefix=UNWIND-TABLES %s --implicit-check-not=warning:
|
||||
// UNWIND-TABLES: "-funwind-tables=2"
|
||||
|
||||
// RUN: %clang -target i386-apple-darwin9 -### -S %s -o %t.s 2>&1 | \
|
||||
|
|
Loading…
Reference in New Issue