Dean Michael Berris | 8d10a87 | 2017-09-26 04:17:37 +0000 | [diff] [blame^] | 1 | // RUN: %clangxx -shared -o /dev/null -v -fxray-instrument %s |
Dean Michael Berris | f686a90 | 2017-09-26 04:00:41 +0000 | [diff] [blame] | 2 | // RUN: %clangxx -shared -o /dev/null -v -fxray-instrument %s 2>&1 | \ |
Dean Michael Berris | c67811c | 2017-09-26 03:18:11 +0000 | [diff] [blame] | 3 | // RUN: FileCheck %s --check-prefix=SHARED |
Dean Michael Berris | 8d10a87 | 2017-09-26 04:17:37 +0000 | [diff] [blame^] | 4 | // RUN: %clangxx -static -o /dev/null -v -fxray-instrument %s -DMAIN |
Dean Michael Berris | c67811c | 2017-09-26 03:18:11 +0000 | [diff] [blame] | 5 | // RUN: %clangxx -static -o /dev/null -v -fxray-instrument %s 2>&1 -DMAIN | \ |
| 6 | // RUN: FileCheck %s --check-prefix=STATIC |
Dean Michael Berris | c67811c | 2017-09-26 03:18:11 +0000 | [diff] [blame] | 7 | // |
| 8 | // SHARED-NOT: {{clang_rt\.xray-}} |
| 9 | // STATIC: {{clang_rt\.xray-}} |
| 10 | // |
Dean Michael Berris | 394f388 | 2017-09-26 04:07:45 +0000 | [diff] [blame] | 11 | // REQUIRES: linux, enable_shared |
Dean Michael Berris | c67811c | 2017-09-26 03:18:11 +0000 | [diff] [blame] | 12 | int foo() { return 42; } |
| 13 | |
| 14 | #ifdef MAIN |
| 15 | int main() { return foo(); } |
| 16 | #endif |