[PATCH] D100388: [BROKEN][clang] Try to fix thunk function types

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 10 15:00:14 PDT 2021


efriedma added a comment.

Made a couple suggestions to make this easier to review.

The test changes you've made so far seem reasonable.

Is there some specific section of the code you want feedback on?



================
Comment at: clang/include/clang/Basic/Thunk.h:1
+//===----- Thunk.h - Declarations related to VTable Thunks ------*- C++ -*-===//
+//
----------------
Can you split the new Thunk.h, and the minimal set of changes required to use it, into a separate NFC patch?


================
Comment at: clang/lib/CodeGen/CGVTables.cpp:750
   case VTableComponent::CK_DeletingDtorPointer: {
-    GlobalDecl GD;
-
-    // Get the right global decl.
-    switch (component.getKind()) {
-    default:
-      llvm_unreachable("Unexpected vtable component kind");
-    case VTableComponent::CK_FunctionPointer:
-      GD = component.getFunctionDecl();
-      break;
-    case VTableComponent::CK_CompleteDtorPointer:
-      GD = GlobalDecl(component.getDestructorDecl(), Dtor_Complete);
-      break;
-    case VTableComponent::CK_DeletingDtorPointer:
-      GD = GlobalDecl(component.getDestructorDecl(), Dtor_Deleting);
-      break;
-    }
+    GlobalDecl GD = component.getGlobalDecl();
 
----------------
Can land this separately.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100388/new/

https://reviews.llvm.org/D100388



More information about the cfe-commits mailing list