Dean Michael Berris | 7fb0545 | 2017-09-26 04:29:25 +0000 | [diff] [blame] | 1 | // RUN: %clangxx -shared -o /dev/null -v -fxray-instrument %s -### |
| 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 | 7fb0545 | 2017-09-26 04:29:25 +0000 | [diff] [blame] | 4 | // RUN: %clangxx -static -o /dev/null -v -fxray-instrument %s -### -DMAIN |
| 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 | // |
Kamil Rytarowski | 30c0a37 | 2018-02-22 06:48:34 +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 |