forked from OSchip/llvm-project
Check for null pointer before dereferencing. A careless typo on my part.
I don't know why this did not show up earlier. This code has been around for ages. llvm-svn: 197119
This commit is contained in:
parent
bf6dda5116
commit
3230e725aa
|
@ -2331,7 +2331,7 @@ getOpndList(SmallVectorImpl<SDValue> &Ops,
|
|||
if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(CLI.Callee)) {
|
||||
llvm::StringRef Sym = G->getGlobal()->getName();
|
||||
Function *F = G->getGlobal()->getParent()->getFunction(Sym);
|
||||
if (F->hasFnAttribute("__Mips16RetHelper")) {
|
||||
if (F && F->hasFnAttribute("__Mips16RetHelper")) {
|
||||
Mask = MipsRegisterInfo::getMips16RetHelperMask();
|
||||
}
|
||||
}
|
||||
|
@ -3262,7 +3262,7 @@ MipsTargetLowering::MipsCC::SpecialCallingConvType
|
|||
if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee)) {
|
||||
llvm::StringRef Sym = G->getGlobal()->getName();
|
||||
Function *F = G->getGlobal()->getParent()->getFunction(Sym);
|
||||
if (F->hasFnAttribute("__Mips16RetHelper")) {
|
||||
if (F && F->hasFnAttribute("__Mips16RetHelper")) {
|
||||
SpecialCallingConv = MipsCC::Mips16RetHelperConv;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue