]> granicus.if.org Git - clang/commitdiff
[XRay] ARM 32-bit no-Thumb support in Clang
authorDean Michael Berris <dberris@google.com>
Thu, 8 Sep 2016 00:23:28 +0000 (00:23 +0000)
committerDean Michael Berris <dberris@google.com>
Thu, 8 Sep 2016 00:23:28 +0000 (00:23 +0000)
Just a test for now, adapted from x86_64 tests of XRay.
This is one of 3 commits to different repositories of XRay ARM port. The
other 2 are:

1. https://reviews.llvm.org/D23931 (LLVM)
2. https://reviews.llvm.org/D23933 (compiler-rt)

Differential Review: https://reviews.llvm.org/D23932

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280889 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/xray-attributes-supported-arm.cpp [new file with mode: 0644]

diff --git a/test/CodeGen/xray-attributes-supported-arm.cpp b/test/CodeGen/xray-attributes-supported-arm.cpp
new file mode 100644 (file)
index 0000000..3104f28
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - -triple arm-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"