diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2015-02-07 08:26:40 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2015-02-07 08:26:40 +0000 |
| commit | 5614ea9aae25fc763d184ee4b940eac27f5ec3a7 (patch) | |
| tree | 7cf8614df3f529e145578c12614956b264041a63 /llvm/test/MC | |
| parent | c94234c11cce3e6ff99b77d2505e9a9cb4ef0c98 (diff) | |
| download | bcm5719-llvm-5614ea9aae25fc763d184ee4b940eac27f5ec3a7.tar.gz bcm5719-llvm-5614ea9aae25fc763d184ee4b940eac27f5ec3a7.zip | |
MC: Emit COFF section flags in the "proper" order
COFF section flags are not idempotent:
'rd' will make a read-write section because 'd' implies write
'dr' will make a read-only section because 'r' disables write
llvm-svn: 228490
Diffstat (limited to 'llvm/test/MC')
| -rw-r--r-- | llvm/test/MC/COFF/bss_section.ll | 2 | ||||
| -rw-r--r-- | llvm/test/MC/COFF/const-gv-with-rel-init.ll | 4 | ||||
| -rw-r--r-- | llvm/test/MC/COFF/global_ctors_dtors.ll | 12 | ||||
| -rw-r--r-- | llvm/test/MC/COFF/initialised-data.ll | 2 | ||||
| -rw-r--r-- | llvm/test/MC/COFF/section-passthru-flags.s | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/llvm/test/MC/COFF/bss_section.ll b/llvm/test/MC/COFF/bss_section.ll index f80a0712b7e..d3a8aec45db 100644 --- a/llvm/test/MC/COFF/bss_section.ll +++ b/llvm/test/MC/COFF/bss_section.ll @@ -7,4 +7,4 @@ $thingy_linkonce = comdat any @thingy_linkonce = linkonce_odr global %struct.foo zeroinitializer, comdat, align 4 -; CHECK: .section .bss,"wb",discard,_thingy_linkonce +; CHECK: .section .bss,"bw",discard,_thingy_linkonce diff --git a/llvm/test/MC/COFF/const-gv-with-rel-init.ll b/llvm/test/MC/COFF/const-gv-with-rel-init.ll index 6a89e2faa68..fde5a17ad51 100644 --- a/llvm/test/MC/COFF/const-gv-with-rel-init.ll +++ b/llvm/test/MC/COFF/const-gv-with-rel-init.ll @@ -5,7 +5,7 @@ define void @f() { } @ptr = constant void ()* @f, section ".CRT$XLB", align 8 -; CHECK: .section .CRT$XLB,"rd" +; CHECK: .section .CRT$XLB,"dr" @weak_array = weak_odr unnamed_addr constant [1 x i8*] [i8* bitcast (void ()* @f to i8*)] -; CHECK: .section .rdata,"rd" +; CHECK: .section .rdata,"dr" diff --git a/llvm/test/MC/COFF/global_ctors_dtors.ll b/llvm/test/MC/COFF/global_ctors_dtors.ll index ca17f24a68e..be92c27c0d8 100644 --- a/llvm/test/MC/COFF/global_ctors_dtors.ll +++ b/llvm/test/MC/COFF/global_ctors_dtors.ll @@ -49,17 +49,17 @@ define i32 @main() nounwind { ret i32 0 } -; WIN32: .section .CRT$XCU,"rd" +; WIN32: .section .CRT$XCU,"dr" ; WIN32: a_global_ctor -; WIN32: .section .CRT$XCU,"rd",associative,{{_?}}b +; WIN32: .section .CRT$XCU,"dr",associative,{{_?}}b ; WIN32: b_global_ctor ; WIN32-NOT: c_global_ctor -; WIN32: .section .CRT$XTX,"rd" +; WIN32: .section .CRT$XTX,"dr" ; WIN32: a_global_dtor -; MINGW32: .section .ctors,"wd" +; MINGW32: .section .ctors,"dw" ; MINGW32: a_global_ctor -; MINGW32: .section .ctors,"wd",associative,{{_?}}b +; MINGW32: .section .ctors,"dw",associative,{{_?}}b ; MINGW32: b_global_ctor ; MINGW32-NOT: c_global_ctor -; MINGW32: .section .dtors,"wd" +; MINGW32: .section .dtors,"dw" ; MINGW32: a_global_dtor diff --git a/llvm/test/MC/COFF/initialised-data.ll b/llvm/test/MC/COFF/initialised-data.ll index c4284696b8c..a2faac74856 100644 --- a/llvm/test/MC/COFF/initialised-data.ll +++ b/llvm/test/MC/COFF/initialised-data.ll @@ -3,5 +3,5 @@ @data = dllexport constant [5 x i8] c"data\00", align 1 -; CHECK: .section .rdata,"rd" +; CHECK: .section .rdata,"dr" diff --git a/llvm/test/MC/COFF/section-passthru-flags.s b/llvm/test/MC/COFF/section-passthru-flags.s index 3bd061b391d..96e42d23351 100644 --- a/llvm/test/MC/COFF/section-passthru-flags.s +++ b/llvm/test/MC/COFF/section-passthru-flags.s @@ -3,5 +3,5 @@ // CHECK: .section .klaatu,"wn" .section .barada,"y" // CHECK: .section .barada,"y" -.section .nikto,"wds" -// CHECK: .section .nikto,"wds" +.section .nikto,"dws" +// CHECK: .section .nikto,"dws" |

