ARM: use the proper target object format for WoA

WoA uses COFF, not ELF.  ARMISelLowering::createTLOF would previously return ELF
for any non-MachO platform.  This was a missed site when the original change for
target format support for Windows on ARM was done.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209057 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Saleem Abdulrasool 2014-05-17 04:28:08 +00:00
parent 2ff4a49344
commit 563fca4509
2 changed files with 17 additions and 1 deletions

View File

@ -158,7 +158,8 @@ void ARMTargetLowering::addQRTypeForNEON(MVT VT) {
static TargetLoweringObjectFile *createTLOF(TargetMachine &TM) {
if (TM.getSubtarget<ARMSubtarget>().isTargetMachO())
return new TargetLoweringObjectFileMachO();
if (TM.getSubtarget<ARMSubtarget>().isTargetWindows())
return new TargetLoweringObjectFileCOFF();
return new ARMElfTargetObjectFile();
}

View File

@ -0,0 +1,15 @@
; RUN: llc -mtriple thumbv7-windows -filetype asm -o - %s | FileCheck %s
@.str = private unnamed_addr constant [7 x i8] c"string\00", align 1
declare arm_aapcs_vfpcc void @callee(i8*)
define arm_aapcs_vfpcc void @function() {
entry:
call arm_aapcs_vfpcc void @callee(i8* getelementptr inbounds ([7 x i8]* @.str, i32 0, i32 0))
ret void
}
; CHECK: .section ".rdata","rd"
; CHECK-NOT: .section ".rodata.str1.1"