[clang] 90179f2 - [NFC] Add a comment to member-function-pointer-calls.cpp

Alex Richardson via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 28 09:58:03 PDT 2021


Author: Alex Richardson
Date: 2021-09-28T17:57:36+01:00
New Revision: 90179f2323ac4ca0ed28ee94b9a61b565c1b61b6

URL: https://github.com/llvm/llvm-project/commit/90179f2323ac4ca0ed28ee94b9a61b565c1b61b6
DIFF: https://github.com/llvm/llvm-project/commit/90179f2323ac4ca0ed28ee94b9a61b565c1b61b6.diff

LOG: [NFC] Add a comment to member-function-pointer-calls.cpp

Looking at this test I did not see why MinGW was using a different command
line until I looked at the git history. Add a comment explaining what this
RUN line is actually testing. Also add two more RUN lines to show that
indirectly passed member pointers don't inhibit the optimization.

Added: 
    

Modified: 
    clang/test/CodeGenCXX/member-function-pointer-calls.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGenCXX/member-function-pointer-calls.cpp b/clang/test/CodeGenCXX/member-function-pointer-calls.cpp
index f2e485bf15a55..24d70b3309cd5 100644
--- a/clang/test/CodeGenCXX/member-function-pointer-calls.cpp
+++ b/clang/test/CodeGenCXX/member-function-pointer-calls.cpp
@@ -1,6 +1,10 @@
 // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -O3 -fno-experimental-new-pass-manager  -o - | FileCheck %s
 // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -O3 -fexperimental-new-pass-manager  -o - | FileCheck %s
+/// Check that we pass the member pointers indirectly for MinGW64
 // RUN: %clang_cc1 %s -triple=x86_64-windows-gnu -emit-llvm -o - | FileCheck %s -check-prefix MINGW64
+/// We should be able to optimize calls via the indirectly passed member pointers
+// RUN: %clang_cc1 %s -triple=x86_64-windows-gnu -emit-llvm -O3 -fno-experimental-new-pass-manager  -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-windows-gnu -emit-llvm -O3 -fexperimental-new-pass-manager  -o - | FileCheck %s
 struct A {
   virtual int vf1() { return 1; }
   virtual int vf2() { return 2; }


        


More information about the cfe-commits mailing list