From 4de906d4118574ceca08d81160a4dc829d1487f8 Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Sat, 12 Dec 2015 17:39:38 +0000 Subject: [PATCH] [PGO] add a test case with -no-integrated-as git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255436 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Profile/cxx-static.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/Profile/cxx-static.cpp diff --git a/test/Profile/cxx-static.cpp b/test/Profile/cxx-static.cpp new file mode 100644 index 0000000000..b3e57c300f --- /dev/null +++ b/test/Profile/cxx-static.cpp @@ -0,0 +1,13 @@ +// RUN: %clang -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(); +} + -- 2.50.1