From c720d46ed7a4c7e9c1fcc7c52ec434ee0ad0bf83 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 11 Dec 2012 05:52:24 +0000 Subject: [PATCH] Add tests for a corner case of when to relax all instructions: 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. llvm-svn: 169815 --- clang/test/Driver/integrated-as.c | 4 ++++ clang/test/Driver/integrated-as.s | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 clang/test/Driver/integrated-as.c create mode 100644 clang/test/Driver/integrated-as.s diff --git a/clang/test/Driver/integrated-as.c b/clang/test/Driver/integrated-as.c new file mode 100644 index 000000000000..e0131754b0b4 --- /dev/null +++ b/clang/test/Driver/integrated-as.c @@ -0,0 +1,4 @@ +// RUN: %clang -### -c -save-temps -integrated-as %s 2>&1 | FileCheck %s + +// CHECK: cc1as +// CHECK: -relax-all diff --git a/clang/test/Driver/integrated-as.s b/clang/test/Driver/integrated-as.s new file mode 100644 index 000000000000..2b07484fe1bb --- /dev/null +++ b/clang/test/Driver/integrated-as.s @@ -0,0 +1,4 @@ +// RUN: %clang -### -c -integrated-as %s 2>&1 | FileCheck %s + +// CHECK: cc1as +// CHECK-NOT: -relax-all