summaryrefslogtreecommitdiff
path: root/test/Profile
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2015-12-13 03:03:35 +0000
committerXinliang David Li <davidxl@google.com>2015-12-13 03:03:35 +0000
commitd49fc0e897f4ede3d9db30e47b4f13d2d157c3ca (patch)
treeafedf4edd10b978b5a4a82c293befa6422caf5c9 /test/Profile
parentc5cb1aebf21b2ef161d9903fe14ed6a0de28f86c (diff)
Resubmit new test case after adding more constraint
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255445 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Profile')
-rw-r--r--test/Profile/cxx-static.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Profile/cxx-static.cpp b/test/Profile/cxx-static.cpp
new file mode 100644
index 0000000000..39ace1ecb4
--- /dev/null
+++ b/test/Profile/cxx-static.cpp
@@ -0,0 +1,11 @@
+// REQUIRES: x86-registered-target
+// RUN: %clang -target i386-unknown-linux -std=c++11 -o %t.o -c -no-integrated-as -fprofile-instr-generate %s
+
+__attribute__((noinline)) static int bar() { return 1; }
+
+int foo(int a, int b) {
+ auto Func = [](int a, int b) { return a > b; };
+
+ return Func(a, b) + bar();
+}
+