aboutsummaryrefslogtreecommitdiff
path: root/test/Driver/XRay/xray-shared-noxray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Driver/XRay/xray-shared-noxray.cpp')
-rw-r--r--test/Driver/XRay/xray-shared-noxray.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Driver/XRay/xray-shared-noxray.cpp b/test/Driver/XRay/xray-shared-noxray.cpp
new file mode 100644
index 000000000000..c279f93f3f3d
--- /dev/null
+++ b/test/Driver/XRay/xray-shared-noxray.cpp
@@ -0,0 +1,16 @@
+// RUN: %clangxx -shared -o /dev/null -v -fxray-instrument %s -###
+// RUN: %clangxx -shared -o /dev/null -v -fxray-instrument %s -### 2>&1 | \
+// RUN: FileCheck %s --check-prefix=SHARED
+// RUN: %clangxx -static -o /dev/null -v -fxray-instrument %s -### -DMAIN
+// RUN: %clangxx -static -o /dev/null -v -fxray-instrument %s -### 2>&1 -DMAIN \
+// RUN: | FileCheck %s --check-prefix=STATIC
+//
+// SHARED-NOT: {{clang_rt\.xray-}}
+// STATIC: {{clang_rt\.xray-}}
+//
+// REQUIRES: linux, enable_shared
+int foo() { return 42; }
+
+#ifdef MAIN
+int main() { return foo(); }
+#endif