-
Notifications
You must be signed in to change notification settings - Fork 813
Open
Labels
needs-triageAwaiting triageAwaiting triage
Description
@bogner commented here. Edited relevant bits for issue:
using the result of llvm::dyn_cast without checking for null is asking for a segfault. If this is known to be the right type we should be using llvm::cast instead.
It turns out that this function is never even called in this project, though it is a shared header that drivers use, so I'd be hesitant to just remove it.
I think the point of this method was to guarantee you won't index outside the call operands when calling get_*/set_* methods.
This method could be generated like this:
bool isArgumentListValid() const {
if (llvm::CallInst *CI = llvm::dyn_cast<llvm::CallInst>(Instr))
if (1 == CI->getNumArgOperands())
return true;
return false;
}Originally posted by @tex3d in #7947 (comment)
Metadata
Metadata
Assignees
Labels
needs-triageAwaiting triageAwaiting triage
Type
Projects
Status
No status