diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-03-11 19:58:37 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-03-11 19:58:37 +0000 |
| commit | ab447e436daf038e88a2a75a72b6d4a94a1516b2 (patch) | |
| tree | e26d0a1ffb7a52959509b48218e8c54994fcd40a /llvm/test/CodeGen | |
| parent | 0d0a1a53e3870d1c816bec193841e9d2db1a1b68 (diff) | |
| download | bcm5719-llvm-ab447e436daf038e88a2a75a72b6d4a94a1516b2.tar.gz bcm5719-llvm-ab447e436daf038e88a2a75a72b6d4a94a1516b2.zip | |
Put jump tables in unique sections on COFF.
If a function is going in an unique section (because of -ffunction-sections
for example), putting a jump table in .rodata will keep .rodata alive and
that will keep alive any other function that also has a jump table.
Instead, put the jump table in a unique section that is associated with the
function.
llvm-svn: 231961
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/X86/global-sections.ll | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/global-sections.ll b/llvm/test/CodeGen/X86/global-sections.ll index cd42f99b771..dcdc71efdc4 100644 --- a/llvm/test/CodeGen/X86/global-sections.ll +++ b/llvm/test/CodeGen/X86/global-sections.ll @@ -6,6 +6,7 @@ ; RUN: llc < %s -mtriple=i386-unknown-linux-gnu -function-sections | FileCheck %s -check-prefix=LINUX-FUNC-SECTIONS ; RUN: llc < %s -mtriple=x86_64-pc-linux -data-sections -function-sections -relocation-model=pic | FileCheck %s -check-prefix=LINUX-SECTIONS-PIC ; RUN: llc < %s -mtriple=i686-pc-win32 -data-sections -function-sections | FileCheck %s -check-prefix=WIN32-SECTIONS +; RUN: llc < %s -mtriple=i686-pc-win32 -function-sections | FileCheck %s -check-prefix=WIN32-FUNC-SECTIONS define void @F1() { ret void @@ -48,6 +49,11 @@ bb5: ; LINUX-FUNC-SECTIONS-NEXT: .cfi_endproc ; LINUX-FUNC-SECTIONS-NEXT: .section .rodata.F2,"a",@progbits +; WIN32-FUNC-SECTIONS: .section .text,"xr",one_only,_F2 +; WIN32-FUNC-SECTIONS-NOT: .section +; WIN32-FUNC-SECTIONS: .section .rdata,"dr",associative,_F2 + + ; LINUX-SECTIONS-PIC: .section .text.F2,"ax",@progbits ; LINUX-SECTIONS-PIC: .size F2, ; LINUX-SECTIONS-PIC-NEXT: .cfi_endproc |

