summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/xray-attributes-supported-mips.cpp
diff options
context:
space:
mode:
authorSagar Thakur <sagar.thakur@imgtec.com>2017-02-15 10:41:38 +0000
committerSagar Thakur <sagar.thakur@imgtec.com>2017-02-15 10:41:38 +0000
commit9d0ed930ec9a47a2fc2acb9b633ea186b7af669d (patch)
treea8a156f5d163b5b0b17ab520a68b9ef9eb4d50a3 /clang/test/CodeGen/xray-attributes-supported-mips.cpp
parenteef9b03395ccd2908718585e2b6d17c392e6ccd5 (diff)
downloadbcm5719-llvm-9d0ed930ec9a47a2fc2acb9b633ea186b7af669d.tar.gz
bcm5719-llvm-9d0ed930ec9a47a2fc2acb9b633ea186b7af669d.zip
[XRAY][MIPS] Add -fxray-instrument for mips/mipsel/mips64/mips64el
Summary: Adds xray instrument option for mips/mipsel/mips64/mips64el. Reviewed by sdardis, dberris Differential: D27698 llvm-svn: 295163
Diffstat (limited to 'clang/test/CodeGen/xray-attributes-supported-mips.cpp')
-rw-r--r--clang/test/CodeGen/xray-attributes-supported-mips.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/CodeGen/xray-attributes-supported-mips.cpp b/clang/test/CodeGen/xray-attributes-supported-mips.cpp
new file mode 100644
index 00000000000..a7d04da8fe8
--- /dev/null
+++ b/clang/test/CodeGen/xray-attributes-supported-mips.cpp
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - -triple mips-unknown-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - -triple mipsel-unknown-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - -triple mips64-unknown-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - -triple mips64el-unknown-linux-gnu | FileCheck %s
+
+// Make sure that the LLVM attribute for XRay-annotated functions do show up.
+[[clang::xray_always_instrument]] void foo() {
+// CHECK: define void @_Z3foov() #0
+};
+
+[[clang::xray_never_instrument]] void bar() {
+// CHECK: define void @_Z3barv() #1
+};
+
+// CHECK: #0 = {{.*}}"function-instrument"="xray-always"
+// CHECK: #1 = {{.*}}"function-instrument"="xray-never"
OpenPOWER on IntegriCloud