llvm-6502/test/MC/COFF/const-gv-with-rel-init.ll
David Majnemer 3f34ae97b9 MC: Treat ReadOnlyWithRel and ReadOnlyWithRelLocal as ReadOnly for COFF
A problem with our old behavior becomes observable under x86-64 COFF
when we need a read-only GV which has an initializer which is referenced
using a relocation: we would mark the section as writable.  Marking the
section as writable interferes with section merging.

This fixes PR21009.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218179 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-20 07:31:46 +00:00

9 lines
188 B
LLVM

; RUN: llc -mtriple x86_64-pc-windows-msvc < %s | FileCheck %s
define void @f() {
ret void
}
@ptr = constant void ()* @f, section ".CRT$XLB", align 8
; CHECK: .section .CRT$XLB,"rd"