]> granicus.if.org Git - clang/commitdiff
Add tests for a corner case of when to relax all instructions:
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 11 Dec 2012 05:52:24 +0000 (05:52 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 11 Dec 2012 05:52:24 +0000 (05:52 +0000)
We don't want to relax all instructions in

$ clang -c test.s

since most users don't pass -O when using the driver to assemble.

On the other hand, -save-temps should not change the output unnecessary, so in

$ clang -c test.c -save-temps

we should relax all instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169815 91177308-0d34-0410-b5e6-96231b3b80d8

test/Driver/integrated-as.c [new file with mode: 0644]
test/Driver/integrated-as.s [new file with mode: 0644]

diff --git a/test/Driver/integrated-as.c b/test/Driver/integrated-as.c
new file mode 100644 (file)
index 0000000..e013175
--- /dev/null
@@ -0,0 +1,4 @@
+// RUN: %clang -### -c -save-temps -integrated-as %s 2>&1 | FileCheck %s
+
+// CHECK: cc1as
+// CHECK: -relax-all
diff --git a/test/Driver/integrated-as.s b/test/Driver/integrated-as.s
new file mode 100644 (file)
index 0000000..2b07484
--- /dev/null
@@ -0,0 +1,4 @@
+// RUN: %clang -### -c -integrated-as %s 2>&1 | FileCheck %s
+
+// CHECK: cc1as
+// CHECK-NOT: -relax-all