mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +00: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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187956 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a1eacd020f
commit
9706d43b56
@ -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…
x
Reference in New Issue
Block a user