Skip to content

Commit 9ba9c5b

Browse files
committed
Refactor duplicated code. NFC.
llvm-svn: 272905
1 parent c1d739f commit 9ba9c5b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Target/ARM/ARMISelLowering.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1807,7 +1807,7 @@ ARMTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
18071807
!shouldAssumeDSOLocal(RM, TargetTriple, *Mod, GV) &&
18081808
Subtarget->isTargetMachO();
18091809

1810-
bool isARMFunc = false;
1810+
bool isARMFunc = !Subtarget->isThumb() || (isStub && !Subtarget->isMClass());
18111811
bool isLocalARMFunc = false;
18121812
ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>();
18131813
auto PtrVt = getPointerTy(DAG.getDataLayout());
@@ -1852,7 +1852,6 @@ ARMTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
18521852
isDirect = true;
18531853
bool isDef = GV->isStrongDefinitionForLinker();
18541854

1855-
isARMFunc = !Subtarget->isThumb() || (isStub && !Subtarget->isMClass());
18561855
// ARM call to a local ARM function is predicable.
18571856
isLocalARMFunc = !Subtarget->isThumb() && (isDef || !ARMInterworking);
18581857
// tBX takes a register source operand.
@@ -1888,7 +1887,6 @@ ARMTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
18881887
}
18891888
} else if (ExternalSymbolSDNode *S = dyn_cast<ExternalSymbolSDNode>(Callee)) {
18901889
isDirect = true;
1891-
isARMFunc = !Subtarget->isThumb() || (isStub && !Subtarget->isMClass());
18921890
// tBX takes a register source operand.
18931891
const char *Sym = S->getSymbol();
18941892
if (isARMFunc && Subtarget->isThumb1Only() && !Subtarget->hasV5TOps()) {

0 commit comments

Comments
 (0)