Don't create new comdats in CodeGen.

This patch stops the implicit creation of comdats during codegen.

Clang now sets the comdat explicitly when it is required. With this patch clang and gcc
now produce the same result in pr19848.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226038 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-01-14 20:55:48 +00:00
parent f7db2526ad
commit 33f5127540
15 changed files with 63 additions and 137 deletions
+6 -6
View File
@@ -33,13 +33,13 @@
; CHECK: @available_externally.var = available_externally constant i32 0{{$}}
@linkonce.var = linkonce constant i32 0
; CHECK: @linkonce.var = linkonce constant i32 0{{$}}
; CHECK: @linkonce.var = linkonce constant i32 0, comdat{{$}}
@weak.var = weak constant i32 0
; CHECK: @weak.var = weak constant i32 0{{$}}
; CHECK: @weak.var = weak constant i32 0, comdat{{$}}
@linkonce_odr.var = linkonce_odr constant i32 0
; CHECK: @linkonce_odr.var = linkonce_odr constant i32 0{{$}}
; CHECK: @linkonce_odr.var = linkonce_odr constant i32 0, comdat{{$}}
@linkonce_odr_auto_hide.var = linkonce_odr_auto_hide constant i32 0
; CHECK: @linkonce_odr_auto_hide.var = constant i32 0{{$}}
@@ -90,19 +90,19 @@ define available_externally void @available_externally()
}
define linkonce void @linkonce()
; CHECK: define linkonce void @linkonce() {
; CHECK: define linkonce void @linkonce() comdat {
{
ret void
}
define weak void @weak()
; CHECK: define weak void @weak() {
; CHECK: define weak void @weak() comdat {
{
ret void
}
define linkonce_odr void @linkonce_odr()
; CHECK: define linkonce_odr void @linkonce_odr() {
; CHECK: define linkonce_odr void @linkonce_odr() comdat {
{
ret void
}