forked from OSchip/llvm-project
ARM: fix `-mlong-calls` for WoA
Not all code-paths set the relocation model to static for Windows. This currently breaks on Windows ARM with `-mlong-calls` when built with clang. Loosen the assertion to what it was previously. We would ideally ensure that all the configuration sets Windows to static relocation model. llvm-svn: 274570
This commit is contained in:
parent
2d79389508
commit
4d950ef892
|
@ -1814,7 +1814,7 @@ ARMTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
|
||||||
auto PtrVt = getPointerTy(DAG.getDataLayout());
|
auto PtrVt = getPointerTy(DAG.getDataLayout());
|
||||||
|
|
||||||
if (Subtarget->genLongCalls()) {
|
if (Subtarget->genLongCalls()) {
|
||||||
assert(!isPositionIndependent() &&
|
assert((!isPositionIndependent() || Subtarget->isTargetWindows()) &&
|
||||||
"long-calls codegen is not position independent!");
|
"long-calls codegen is not position independent!");
|
||||||
// Handle a global address or an external symbol. If it's not one of
|
// Handle a global address or an external symbol. If it's not one of
|
||||||
// those, the target's already in a register, so we don't need to do
|
// those, the target's already in a register, so we don't need to do
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
; RUN: llc -mtriple=thumbv7-windows -mcpu=cortex-a9 -mattr=+long-calls -o - %s \
|
; RUN: llc -mtriple=thumbv7-windows -mcpu=cortex-a9 -relocation-model pic -mattr=+long-calls -o - %s \
|
||||||
; RUN: | FileCheck %s
|
; RUN: | FileCheck %s
|
||||||
|
|
||||||
declare arm_aapcs_vfpcc void @callee()
|
declare arm_aapcs_vfpcc void @callee()
|
||||||
|
|
Loading…
Reference in New Issue