diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-10-31 02:28:58 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-10-31 02:28:58 +0000 |
| commit | 1e2cf0dd4bd7c76fc5a7862e42e2bac2da451fc7 (patch) | |
| tree | a3e3b09843dd8512b605135326be004408011503 /clang/test/Modules/explicit-build-flags.cpp | |
| parent | d5e7ff856c2c8d58cb1ef4ed0bce838a70215b18 (diff) | |
| download | bcm5719-llvm-1e2cf0dd4bd7c76fc5a7862e42e2bac2da451fc7.tar.gz bcm5719-llvm-1e2cf0dd4bd7c76fc5a7862e42e2bac2da451fc7.zip | |
[modules] When a .pcm file is explicitly built separately from the translation
unit, allow the -O settings of the two compilations to differ.
llvm-svn: 220943
Diffstat (limited to 'clang/test/Modules/explicit-build-flags.cpp')
| -rw-r--r-- | clang/test/Modules/explicit-build-flags.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Modules/explicit-build-flags.cpp b/clang/test/Modules/explicit-build-flags.cpp index bb5c4169765..c5c3df92aba 100644 --- a/clang/test/Modules/explicit-build-flags.cpp +++ b/clang/test/Modules/explicit-build-flags.cpp @@ -25,6 +25,13 @@ // Can use the module if -I flags change. // RUN: %clang_cc1 -fmodules -DBAR=2 -I. -x c++ -fmodule-map-file=%t/map -fmodule-file=%t/tmp.pcm -verify -I%t %s +// Can use the module if -O flags change. +// RUN: %clang_cc1 -fmodules -DBAR=2 -Os -x c++ -fmodule-map-file=%t/map -fmodule-file=%t/tmp.pcm -verify -I%t %s +// +// RUN: %clang_cc1 -fmodules -DFOO=1 -O2 -x c++ -fmodule-name=tmp %t/map -emit-module -o %t/tmp-O2.pcm +// RUN: %clang_cc1 -fmodules -DBAR=2 -O0 -x c++ -fmodule-map-file=%t/map -fmodule-file=%t/tmp-O2.pcm -verify -I%t %s +// RUN: %clang_cc1 -fmodules -DBAR=2 -Os -x c++ -fmodule-map-file=%t/map -fmodule-file=%t/tmp-O2.pcm -verify -I%t %s + #include "tmp.h" // expected-no-diagnostics #ifndef BAR |

