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