[clang] afab3c4 - [Driver] Default Generic_GCC x86 to -fasynchronous-unwind-tables
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 23 19:39:55 PDT 2021
Author: Fangrui Song
Date: 2021-09-23T19:39:50-07:00
New Revision: afab3c488f0c86af87e262cc7454e04de18e3e6a
URL: https://github.com/llvm/llvm-project/commit/afab3c488f0c86af87e262cc7454e04de18e3e6a
DIFF: https://github.com/llvm/llvm-project/commit/afab3c488f0c86af87e262cc7454e04de18e3e6a.diff
LOG: [Driver] Default Generic_GCC x86 to -fasynchronous-unwind-tables
to match GCC and Clang's own x86-64.
Added:
Modified:
clang/lib/Driver/ToolChains/Gnu.cpp
clang/test/Driver/clang-translation.c
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
index 79bec347baad..9aca45312bb0 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2713,6 +2713,7 @@ bool Generic_GCC::IsUnwindTablesDefault(const ArgList &Args) const {
case llvm::Triple::ppcle:
case llvm::Triple::ppc64:
case llvm::Triple::ppc64le:
+ case llvm::Triple::x86:
case llvm::Triple::x86_64:
return true;
default:
diff --git a/clang/test/Driver/clang-translation.c b/clang/test/Driver/clang-translation.c
index 42322e579472..9802ee3da239 100644
--- a/clang/test/Driver/clang-translation.c
+++ b/clang/test/Driver/clang-translation.c
@@ -1,10 +1,10 @@
-// RUN: %clang -target i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm -funwind-tables -fvisibility=hidden 2>&1 | FileCheck -check-prefix=I386 %s
+// RUN: %clang -target i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm -fvisibility=hidden 2>&1 | FileCheck -check-prefix=I386 %s
// I386: "-triple" "i386-unknown-unknown"
// I386: "-S"
// I386: "-disable-free"
// I386: "-mrelocation-model" "static"
// I386: "-mframe-pointer=all"
-// I386: "-funwind-tables=1"
+// I386: "-funwind-tables=2"
// I386: "-Os"
// I386: "-fvisibility"
// I386: "hidden"
More information about the cfe-commits
mailing list