From 0e5ccd9cec099fc0e3868fbbdd90a8d55411c242 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 7 Apr 2019 23:12:31 +0000 Subject: [PATCH] Enable IAS for FreeBSD SPARC64. llvm-svn: 357878 --- clang/lib/Driver/ToolChains/Gnu.cpp | 3 ++- clang/test/Driver/freebsd.c | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp index 4e0ccce..2a58f0f 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2547,7 +2547,8 @@ bool Generic_GCC::IsIntegratedAssemblerDefault() const { case llvm::Triple::sparc: case llvm::Triple::sparcel: case llvm::Triple::sparcv9: - if (getTriple().isOSSolaris() || getTriple().isOSOpenBSD()) + if (getTriple().isOSFreeBSD() || getTriple().isOSOpenBSD() || + getTriple().isOSSolaris()) return true; return false; default: diff --git a/clang/test/Driver/freebsd.c b/clang/test/Driver/freebsd.c index aac4d9d..63ddf85 100644 --- a/clang/test/Driver/freebsd.c +++ b/clang/test/Driver/freebsd.c @@ -184,9 +184,11 @@ // RUN: | FileCheck -check-prefix=CHECK-MIPS64-CPU %s // CHECK-MIPS64-CPU: "-target-cpu" "mips3" -// Check that the integrated assembler is enabled for MIPS64 +// Check that the integrated assembler is enabled for MIPS64/SPARC64 // RUN: %clang -target mips64-unknown-freebsd -### -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix=CHECK-MIPS64-AS %s +// RUN: | FileCheck -check-prefix=CHECK-IAS %s // RUN: %clang -target mips64el-unknown-freebsd -### -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix=CHECK-MIPS64-AS %s -// CHECK-MIPS64-AS-NOT: "-no-integrated-as" +// RUN: | FileCheck -check-prefix=CHECK-IAS %s +// RUN: %clang -target sparc64-unknown-freebsd -### -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-IAS %s +// CHECK-IAS-NOT: "-no-integrated-as" -- 2.7.4