diff options
author | James Molloy <james.molloy@arm.com> | 2012-05-02 07:56:14 +0000 |
---|---|---|
committer | James Molloy <james.molloy@arm.com> | 2012-05-02 07:56:14 +0000 |
commit | cebf75e8cabc3772b0b9ddefe949faf6a4e5d602 (patch) | |
tree | 636401094c7387d3c79149ab8dac8a4ea95d5782 /clang/test/Driver/fpack-struct.c | |
parent | b6625979a26c62d54d36fbfb82685e2c48b1c871 (diff) | |
download | bcm5719-llvm-cebf75e8cabc3772b0b9ddefe949faf6a4e5d602.tar.gz bcm5719-llvm-cebf75e8cabc3772b0b9ddefe949faf6a4e5d602.zip |
Fix forwarding of -fpack-struct from driver to CC1, and add a test.
-fpack-struct's handling has changed in CC1 (one of only two flags that needed changing) because the driver treats "-fpack-struct" as a boolean flag, and CC1 (did) treat it as an option with a separated value.
This change causes -fpack-struct=X to be forwarded correctly to -fpack-struct=X instead of erroneously to "-fpack-struct X"
llvm-svn: 155981
Diffstat (limited to 'clang/test/Driver/fpack-struct.c')
-rw-r--r-- | clang/test/Driver/fpack-struct.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Driver/fpack-struct.c b/clang/test/Driver/fpack-struct.c new file mode 100644 index 00000000000..cc75da5bc0f --- /dev/null +++ b/clang/test/Driver/fpack-struct.c @@ -0,0 +1,10 @@ +// RUN: %clang -fpack-struct -### %s 2> %t +// RUN: FileCheck < %t %s +// RUN: %clang -fpack-struct=8 -### %s 2> %t +// RUN: FileCheck < %t %s --check-prefix=EQ + +// CHECK: "-cc1" +// CHECK: "-fpack-struct=1" + +// CHECK-EQ: "-cc1" +// CHECK-EQ: "-fpack-struct=8" |