[PATCH] D26581: Make WholeProgramDevirt understand ConstStruct vtables.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 8 12:30:41 PST 2016
pcc accepted this revision.
pcc added a comment.
This revision is now accepted and ready to land.
LGTM with nit
================
Comment at: lib/Transforms/IPO/WholeProgramDevirt.cpp:386
+Optional<unsigned>
+DevirtModule::getOpAtOffset(const Constant *I, const uint64_t Offset) {
----------------
LemonBoy wrote:
> pcc wrote:
> > Could be simpler to return a `const Constant *` from this function.
> I suppose you meant `const Value *` since that's what `getOperand` returns.
`getOperand` on a constant will only ever return a constant; you could `cast` it below.
https://reviews.llvm.org/D26581
More information about the llvm-commits
mailing list