MaskRay updated this revision to Diff 306312. MaskRay added a comment. Drop an unneeded change
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91760/new/ https://reviews.llvm.org/D91760 Files: clang/lib/Driver/ToolChains/Gnu.cpp clang/test/Driver/aarch64-features.c Index: clang/test/Driver/aarch64-features.c =================================================================== --- clang/test/Driver/aarch64-features.c +++ clang/test/Driver/aarch64-features.c @@ -1,6 +1,8 @@ // RUN: %clang -target aarch64-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s // RUN: %clang -target arm64-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s +// CHECK: "-munwind-tables" + // The AArch64 PCS states that chars should be unsigned. // CHECK: fno-signed-char Index: clang/lib/Driver/ToolChains/Gnu.cpp =================================================================== --- clang/lib/Driver/ToolChains/Gnu.cpp +++ clang/lib/Driver/ToolChains/Gnu.cpp @@ -2672,7 +2672,13 @@ } bool Generic_GCC::IsUnwindTablesDefault(const ArgList &Args) const { - return getArch() == llvm::Triple::x86_64; + switch (getArch()) { + case llvm::Triple::aarch64: + case llvm::Triple::x86_64: + return true; + default: + return false; + } } bool Generic_GCC::isPICDefault() const {
Index: clang/test/Driver/aarch64-features.c =================================================================== --- clang/test/Driver/aarch64-features.c +++ clang/test/Driver/aarch64-features.c @@ -1,6 +1,8 @@ // RUN: %clang -target aarch64-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s // RUN: %clang -target arm64-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s +// CHECK: "-munwind-tables" + // The AArch64 PCS states that chars should be unsigned. // CHECK: fno-signed-char Index: clang/lib/Driver/ToolChains/Gnu.cpp =================================================================== --- clang/lib/Driver/ToolChains/Gnu.cpp +++ clang/lib/Driver/ToolChains/Gnu.cpp @@ -2672,7 +2672,13 @@ } bool Generic_GCC::IsUnwindTablesDefault(const ArgList &Args) const { - return getArch() == llvm::Triple::x86_64; + switch (getArch()) { + case llvm::Triple::aarch64: + case llvm::Triple::x86_64: + return true; + default: + return false; + } } bool Generic_GCC::isPICDefault() const {
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits