mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197119 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
24802f3f82
commit
dcdc5736ad
@ -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
Block a user