Douglas Gregor | 1a995dd | 2011-09-15 18:47:32 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-module -triple x86_64-apple-darwin10 -o %t/module.pcm -DBUILD_MODULE %s |
| 2 | // RUN: %clang_cc1 -fmodule-cache-path %t -triple x86_64-apple-darwin10 -fdisable-module-hash -emit-llvm -o - %s | FileCheck %s |
| 3 | |
| 4 | #ifdef BUILD_MODULE |
| 5 | static inline int triple(int x) { return x * 3; } |
| 6 | #else |
| 7 | __import_module__ module; |
| 8 | |
| 9 | // CHECK: define void @triple_value |
| 10 | void triple_value(int *px) { |
| 11 | *px = triple(*px); |
| 12 | } |
| 13 | |
| 14 | // CHECK: define internal i32 @triple(i32 |
| 15 | #endif |