[clang] 1f5b60a - Explicitly specify -fintegrated-as to clang/test/Driver/compilation_database.c test case.

Amy Kwan via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 27 07:56:32 PDT 2021


Author: Amy Kwan
Date: 2021-09-27T09:56:18-05:00
New Revision: 1f5b60ad47f1fa0493e4c9d8080eace56f87ee0c

URL: https://github.com/llvm/llvm-project/commit/1f5b60ad47f1fa0493e4c9d8080eace56f87ee0c
DIFF: https://github.com/llvm/llvm-project/commit/1f5b60ad47f1fa0493e4c9d8080eace56f87ee0c.diff

LOG: Explicitly specify -fintegrated-as to clang/test/Driver/compilation_database.c test case.

It appears that this test assumes that the toolchain utilizes the integrated
assembler by default, since the expected output in the CHECKs are
compilation_database.o.

However, this test fails on AIX as AIX does not utilize the integrated assembler.
On AIX, the output instead is of the form /tmp/compilation_database-*.s.
Thus, this patch explicitly adds the -fintegrated-as option to match the
assumption that the integrated assembler is used by default.

Differential Revision: https://reviews.llvm.org/D110431

Added: 
    

Modified: 
    clang/test/Driver/compilation_database.c

Removed: 
    


################################################################################
diff  --git a/clang/test/Driver/compilation_database.c b/clang/test/Driver/compilation_database.c
index 343b76aa44f3..da4d1c287cf2 100644
--- a/clang/test/Driver/compilation_database.c
+++ b/clang/test/Driver/compilation_database.c
@@ -1,9 +1,9 @@
 // RUN: mkdir -p %t.workdir && cd %t.workdir
-// RUN: %clang -MD -MP --sysroot=somewhere -c -x c %s -xc++ %s -Wall -MJ - -no-canonical-prefixes 2>&1 | FileCheck %s
+// RUN: %clang -fintegrated-as -MD -MP --sysroot=somewhere -c -x c %s -xc++ %s -Wall -MJ - -no-canonical-prefixes 2>&1 | FileCheck %s
 // RUN: not %clang -c -x c %s -MJ %s/non-existant -no-canonical-prefixes 2>&1 | FileCheck --check-prefix=ERROR %s
 
-// CHECK: { "directory": "{{[^"]*}}workdir",  "file": "[[SRC:[^"]+[/|\\]compilation_database.c]]", "output": "compilation_database.o", "arguments": ["{{[^"]*}}clang{{[^"]*}}", "-xc", "[[SRC]]", "--sysroot=somewhere", "-c", "-Wall",{{.*}} "--target={{[^"]+}}"]},
-// CHECK: { "directory": "{{.*}}",  "file": "[[SRC:[^"]+[/|\\]compilation_database.c]]", "output": "compilation_database.o", "arguments": ["{{[^"]*}}clang{{[^"]*}}", "-xc++", "[[SRC]]", "--sysroot=somewhere", "-c", "-Wall",{{.*}} "--target={{[^"]+}}"]},
+// CHECK: { "directory": "{{[^"]*}}workdir",  "file": "[[SRC:[^"]+[/|\\]compilation_database.c]]", "output": "compilation_database.o", "arguments": ["{{[^"]*}}clang{{[^"]*}}", "-xc", "[[SRC]]", "-fintegrated-as", "--sysroot=somewhere", "-c", "-Wall",{{.*}} "--target={{[^"]+}}"]},
+// CHECK: { "directory": "{{.*}}",  "file": "[[SRC:[^"]+[/|\\]compilation_database.c]]", "output": "compilation_database.o", "arguments": ["{{[^"]*}}clang{{[^"]*}}", "-xc++", "[[SRC]]", "-fintegrated-as", "--sysroot=somewhere", "-c", "-Wall",{{.*}} "--target={{[^"]+}}"]},
 // ERROR: error: compilation database '{{.*}}/non-existant' could not be opened:
 
 int main(void) {


        


More information about the cfe-commits mailing list