This is an archive of the discontinued LLVM Phabricator instance.

Generating available_externally vtables and assume loads bugfix
ClosedPublic

Authored by Prazek on Sep 14 2015, 3:42 PM.

Details

Diff Detail

Event Timeline

Prazek updated this revision to Diff 34745.Sep 14 2015, 3:42 PM
Prazek retitled this revision from to Generating available_externally vtables and assume loads bugfix.
Prazek updated this object.
Prazek added reviewers: rsmith, rjmccall, hans, majnemer.
Prazek added a subscriber: cfe-commits.
Prazek updated this revision to Diff 34750.Sep 14 2015, 3:53 PM
rsmith accepted this revision.Sep 14 2015, 4:11 PM
rsmith edited edge metadata.

LGTM

lib/CodeGen/ItaniumCXXABI.cpp
399–400

No newline before else.

1631

This function is now serving two purposes:

  1. Can we generate a new reference to the vtable that was not implied by the source code and checked by Sema, and
  2. Can we generate a speculative definition of the vtable, despite it (perhaps) not being used.

I'm OK with the current approach as a conservative fix for the issue we're seeing with visibility, but we should aim to separate out these two questions eventually. For the former, we don't need to check the vtable contents, just the visibility of the vtable symbol itself.

test/CodeGenCXX/vtable-assume-load.cpp
186–187

"and all functions aint hidden," -> "and no virtual functions are hidden,"

This revision is now accepted and ready to land.Sep 14 2015, 4:11 PM
majnemer added inline comments.Sep 14 2015, 4:21 PM
lib/CodeGen/ItaniumCXXABI.cpp
394–406

What about the CK_DeletingDtorPointer or CK_CompleteDtorPointer cases?

Prazek updated this revision to Diff 34761.Sep 14 2015, 5:13 PM
Prazek edited edge metadata.
Prazek marked 3 inline comments as done.
Prazek added inline comments.
lib/CodeGen/ItaniumCXXABI.cpp
394–406

isUdedFunctionPointerKind check for CK_FunctionPointer, CK_CompleteDtorPointer, CK_DeletingDtorPointer

Prazek closed this revision.Sep 14 2015, 5:39 PM

Assume loads released.