blob: 0278e0e2ae2f775b16acdf13be6583a715852254 [file] [log] [blame]
Dean Michael Berris8d10a872017-09-26 04:17:37 +00001// RUN: %clangxx -shared -o /dev/null -v -fxray-instrument %s
Dean Michael Berrisf686a902017-09-26 04:00:41 +00002// 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 Berris8d10a872017-09-26 04:17:37 +00004// RUN: %clangxx -static -o /dev/null -v -fxray-instrument %s -DMAIN
Dean Michael Berrisc67811c2017-09-26 03:18:11 +00005// 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