r255436 - [PGO] add a test case with -no-integrated-as

Xinliang David Li via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 12 09:39:39 PST 2015


Author: davidxl
Date: Sat Dec 12 11:39:38 2015
New Revision: 255436

URL: http://llvm.org/viewvc/llvm-project?rev=255436&view=rev
Log:
[PGO] add a test case with -no-integrated-as

Added:
    cfe/trunk/test/Profile/cxx-static.cpp

Added: cfe/trunk/test/Profile/cxx-static.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Profile/cxx-static.cpp?rev=255436&view=auto
==============================================================================
--- cfe/trunk/test/Profile/cxx-static.cpp (added)
+++ cfe/trunk/test/Profile/cxx-static.cpp Sat Dec 12 11:39:38 2015
@@ -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();
+}
+




More information about the cfe-commits mailing list