blob: c279f93f3f3d8440371f73a2d8c8b8a086c1ff4d [file] [log] [blame]
Dean Michael Berris7fb05452017-09-26 04:29:25 +00001// 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 Berrisc67811c2017-09-26 03:18:11 +00003// RUN: FileCheck %s --check-prefix=SHARED
Dean Michael Berris7fb05452017-09-26 04:29:25 +00004// 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 Berrisc67811c2017-09-26 03:18:11 +00007//
8// SHARED-NOT: {{clang_rt\.xray-}}
9// STATIC: {{clang_rt\.xray-}}
10//
Dean Michael Berris394f3882017-09-26 04:07:45 +000011// REQUIRES: linux, enable_shared
Dean Michael Berrisc67811c2017-09-26 03:18:11 +000012int foo() { return 42; }
13
14#ifdef MAIN
15int main() { return foo(); }
16#endif