[PATCH] D16273: [opaque pointer types] CallSite: use getFunctionType() instead of going through PointerType::getElementType.
Manuel Jacob via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 17 14:38:50 PST 2016
mjacob accepted this revision.
mjacob added a comment.
LGTM too. I'll commit it for you.
================
Comment at: lib/Target/Mips/Mips16HardFloat.cpp:430
@@ -429,3 +429,1 @@
} else if (const CallInst *CI = dyn_cast<CallInst>(I)) {
- const Value* V = CI->getCalledValue();
- Type* T = nullptr;
----------------
eddyb wrote:
> dblaikie wrote:
> > This code seems to be going to some efforts to support the possibility that V is null - does that case need to be handled in the new code?
> Not as far as I can tell, `getFunctionType()` seems to be guaranteed non-null.
> The tests pass, although I'm not sure what kind of coverage LLVM has for the Mips16 (sub?)target.
`CI->getCalledValue()` shouldn't return nullptr as well.
http://reviews.llvm.org/D16273
More information about the llvm-commits
mailing list