[clang] 79ceda2 - Fix test added by D79830

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 23 08:39:38 PDT 2020


Author: Erich Keane
Date: 2020-06-23T08:39:25-07:00
New Revision: 79ceda2e394cefd6ce650dc40fce44295e76be2b

URL: https://github.com/llvm/llvm-project/commit/79ceda2e394cefd6ce650dc40fce44295e76be2b
DIFF: https://github.com/llvm/llvm-project/commit/79ceda2e394cefd6ce650dc40fce44295e76be2b.diff

LOG: Fix test added by D79830

This clang test unfortunately depends on the actions of the optimizer,
which some of the buildbots hit.

This patch makes it so it cannot ignore the return value of 'f', so it
won't do away with the implementation.

Added: 
    

Modified: 
    clang/test/CodeGen/builtin-expect-with-probability.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGen/builtin-expect-with-probability.cpp b/clang/test/CodeGen/builtin-expect-with-probability.cpp
index 2d25219e07f5..e63f35be4dcc 100644
--- a/clang/test/CodeGen/builtin-expect-with-probability.cpp
+++ b/clang/test/CodeGen/builtin-expect-with-probability.cpp
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -emit-llvm -o - %s -O1 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -o - -fexperimental-new-pass-manager %s -O1 | FileCheck %s
 extern int global;
 
 struct S {
@@ -15,8 +16,8 @@ int expect_taken(int x) {
 	return x;
 }
 
-void f() {
-  expect_taken<S>(global);
+int f() {
+  return expect_taken<S>(global);
 }
 
 int expect_taken2(int x) {


        


More information about the cfe-commits mailing list