diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-15 18:47:32 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-15 18:47:32 +0000 |
commit | 6137d32c1b3e3cef750b32ac780d6a669a7b27cb (patch) | |
tree | 2dd0a0495683a615ce5d2b6241e9239f662f5820 /clang/test/Modules/irgen.c | |
parent | c2ff27446dc7f7399ada50b073ebfd423f2fb35d (diff) | |
download | bcm5719-llvm-6137d32c1b3e3cef750b32ac780d6a669a7b27cb.tar.gz bcm5719-llvm-6137d32c1b3e3cef750b32ac780d6a669a7b27cb.zip |
When we load the first module, make sure that we wire up the ASTConsumer to the newly-created ASTReader. This makes sure that CodeGen sees the declarations it is interested in
llvm-svn: 139824
Diffstat (limited to 'clang/test/Modules/irgen.c')
-rw-r--r-- | clang/test/Modules/irgen.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/Modules/irgen.c b/clang/test/Modules/irgen.c new file mode 100644 index 00000000000..0debf05f593 --- /dev/null +++ b/clang/test/Modules/irgen.c @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -emit-module -triple x86_64-apple-darwin10 -o %t/module.pcm -DBUILD_MODULE %s +// RUN: %clang_cc1 -fmodule-cache-path %t -triple x86_64-apple-darwin10 -fdisable-module-hash -emit-llvm -o - %s | FileCheck %s + +#ifdef BUILD_MODULE +static inline int triple(int x) { return x * 3; } +#else +__import_module__ module; + +// CHECK: define void @triple_value +void triple_value(int *px) { + *px = triple(*px); +} + +// CHECK: define internal i32 @triple(i32 +#endif |