This is an archive of the discontinued LLVM Phabricator instance.

Make createReferenceType take size and align
ClosedPublic

Authored by loladiro on Nov 2 2015, 7:18 PM.

Details

Summary

Since we're passing references to dbg.value as pointers, we need to have the frontend properly declare their sizes and alignments (as it already does for regular pointers) in preparation for my upcoming patch to have the verifer check that the sizes agree.

Diff Detail

Repository
rL LLVM

Event Timeline

loladiro updated this revision to Diff 39026.Nov 2 2015, 7:18 PM
loladiro retitled this revision from to Make createReferenceType take size and align.
loladiro updated this object.
loladiro added reviewers: aprantl, dexonsmith.
loladiro set the repository for this revision to rL LLVM.
loladiro added a subscriber: llvm-commits.

Gut reaction: This would cause extra DWARF to be emitted which might be
erroneous/confusing... (though, as you point out, there's not much of an
argument for being inconsistent with pointers here)

What's the DWARF look like for pointers and references before and after
your patch? (& the usual "what does GCC do?")

Ah, interesting we skip emitting the size of a pointer in the backend. Will add the same for reference types.

loladiro updated this revision to Diff 39031.Nov 2 2015, 10:14 PM

Skip emitting sizes for reference types in the backend.

loladiro updated this revision to Diff 39256.Nov 4 2015, 2:22 PM

Add a test case to make sure the backend suppression doesn't get removed without somebody noticing. Does this look ok now?

dblaikie accepted this revision.Nov 4 2015, 3:04 PM
dblaikie added a reviewer: dblaikie.

Seems good to me

This revision is now accepted and ready to land.Nov 4 2015, 3:04 PM
This revision was automatically updated to reflect the committed changes.