[PATCH] D12865: Generating available_externally vtables and assume loads bugfix

Piotr Padlewski via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 14 17:15:10 PDT 2015


Prazek added inline comments.

================
Comment at: lib/CodeGen/ItaniumCXXABI.cpp:394-406
@@ +393,15 @@
+
+    for (const auto &VtableComponent : VtableLayout.vtable_components()) {
+      if (VtableComponent.isRTTIKind()) {
+        const CXXRecordDecl *RTTIDecl = VtableComponent.getRTTIDecl();
+        if (RTTIDecl->getVisibility() == Visibility::HiddenVisibility)
+          return true;
+      } else if (VtableComponent.isUsedFunctionPointerKind()) {
+        const CXXMethodDecl *Method = VtableComponent.getFunctionDecl();
+        if (Method->getVisibility() == Visibility::HiddenVisibility &&
+            !Method->isDefined())
+          return true;
+      }
+    }
+    return false;
+  }
----------------
isUdedFunctionPointerKind check for CK_FunctionPointer, CK_CompleteDtorPointer, CK_DeletingDtorPointer


http://reviews.llvm.org/D12865





More information about the cfe-commits mailing list