diff options
| author | Douglas Gregor <dgregor@apple.com> | 2011-10-17 14:55:37 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2011-10-17 14:55:37 +0000 |
| commit | 71129d5e9e3a290df21ef8f3389c1b54b10f62cd (patch) | |
| tree | 1a428c91cd676eb0e96231c15053feb9f1eeb5ec /clang/test/Modules/on-demand-macros.m | |
| parent | fd979b1eaf0f88210625b565166952d6e41fe592 (diff) | |
| download | bcm5719-llvm-71129d5e9e3a290df21ef8f3389c1b54b10f62cd.tar.gz bcm5719-llvm-71129d5e9e3a290df21ef8f3389c1b54b10f62cd.zip | |
When building a module, use the macro definitions on the command line
as part of the hash rather than ignoring them. This means we'll end up
building more module variants (overall), but it allows configuration
macros such as NDEBUG to work so long as they're specified via command
line. More to come in this space.
llvm-svn: 142187
Diffstat (limited to 'clang/test/Modules/on-demand-macros.m')
| -rw-r--r-- | clang/test/Modules/on-demand-macros.m | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/Modules/on-demand-macros.m b/clang/test/Modules/on-demand-macros.m new file mode 100644 index 00000000000..96abb2331f1 --- /dev/null +++ b/clang/test/Modules/on-demand-macros.m @@ -0,0 +1,13 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -fmodule-cache-path %t -F %S/Inputs -DFOO_RETURNS_INT_PTR -verify %s +// RUN: %clang_cc1 -fmodule-cache-path %t -F %S/Inputs -verify %s + +__import_module__ CmdLine; + +void test() { +#ifdef FOO_RETURNS_INT_PTR + int *ip = foo(); +#else + float *fp = foo(); +#endif +} |

