mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Revert "coff also doesn't have a ReadOnlySection yet, (!)"
This reverts commit r77814. We were sticking global constants in the .data section instead of in the .rdata section when emitting for COFF. This fixes PR16831. llvm-svn: 187956
This commit is contained in:
parent
160c346748
commit
e90cbda29f
@ -776,6 +776,9 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
|
||||
if (Kind.isThreadLocal())
|
||||
return getTLSDataSection();
|
||||
|
||||
if (Kind.isReadOnly() && ReadOnlySection != 0)
|
||||
return ReadOnlySection;
|
||||
|
||||
return getDataSection();
|
||||
}
|
||||
|
||||
|
6
test/MC/COFF/rdata.ll
Normal file
6
test/MC/COFF/rdata.ll
Normal file
@ -0,0 +1,6 @@
|
||||
; RUN: llc -mtriple i386-pc-win32 < %s | FileCheck %s
|
||||
|
||||
%struct.foo = type { i32, i32 }
|
||||
|
||||
@"\01?thingy@@3Ufoo@@B" = constant %struct.foo zeroinitializer, align 4
|
||||
; CHECK: .section .rdata
|
Loading…
Reference in New Issue
Block a user