From 77df5169a8323919b74084fb15154d9a1609f570 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Sun, 23 Mar 2014 17:47:39 +0000 Subject: WinCOFF: Add support for -ffunction-sections This is a pretty straight forward translation for COFF, we just need to stick the function in a COMDAT section marked as IMAGE_COMDAT_SELECT_NODUPLICATES. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204565 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/global-sections.ll | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/CodeGen/X86/global-sections.ll b/test/CodeGen/X86/global-sections.ll index c031821f9a..c768c303c8 100644 --- a/test/CodeGen/X86/global-sections.ll +++ b/test/CodeGen/X86/global-sections.ll @@ -3,6 +3,7 @@ ; RUN: llc < %s -mtriple=i386-apple-darwin10 -relocation-model=static | FileCheck %s -check-prefix=DARWIN-STATIC ; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s -check-prefix=DARWIN64 ; RUN: llc < %s -mtriple=i386-unknown-linux-gnu -fdata-sections | FileCheck %s -check-prefix=LINUX-SECTIONS +; RUN: llc < %s -mtriple=i686-pc-win32 -ffunction-sections | FileCheck %s -check-prefix=WIN32-SECTIONS ; int G1; @@ -176,3 +177,10 @@ ; LINUX-SECTIONS: .LG14: ; LINUX-SECTIONS: .asciz "foo" ; LINUX-SECTIONS: .size .LG14, 4 + +define void @G15() { + ret void +} + +; WIN32-SECTIONS: .section .text,"xr",one_only,_G15 +; WIN32-SECTIONS: .globl _G15 -- cgit v1.2.3