2013-12-01 10:16:35 +00:00
|
|
|
; RUN: llvm-dis < %s.bc| FileCheck %s
|
2014-08-19 21:08:27 +00:00
|
|
|
; RUN: verify-uselistorder < %s.bc
|
2013-12-01 10:16:35 +00:00
|
|
|
|
|
|
|
; linkage-types-3.2.ll.bc was generated by passing this file to llvm-as-3.2
|
|
|
|
; The test checks that LLVM does not silently misread linkage types of
|
|
|
|
; older bitcode files.
|
|
|
|
|
|
|
|
@common.var = common global i32 0
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: @common.var = common global i32 0{{$}}
|
2013-12-01 10:16:35 +00:00
|
|
|
|
|
|
|
@appending.var = appending global [8 x i32] undef
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: @appending.var = appending global [8 x i32] undef{{$}}
|
2013-12-01 10:16:35 +00:00
|
|
|
|
|
|
|
@extern_weak.var = extern_weak global i32
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: @extern_weak.var = extern_weak global i32{{$}}
|
2013-12-01 10:16:35 +00:00
|
|
|
|
|
|
|
@private.var = private constant i32 0
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: @private.var = private constant i32 0{{$}}
|
2013-12-01 10:16:35 +00:00
|
|
|
|
|
|
|
@linker_private.var = linker_private constant i32 0
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: @linker_private.var = private constant i32 0{{$}}
|
2013-12-01 10:16:35 +00:00
|
|
|
|
|
|
|
@linker_private_weak.var = linker_private_weak constant i32 0
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: @linker_private_weak.var = private constant i32 0{{$}}
|
2013-12-01 10:16:35 +00:00
|
|
|
|
|
|
|
@linker_private_weak_def_auto.var = linker_private_weak_def_auto constant i32 0
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: @linker_private_weak_def_auto.var = constant i32 0{{$}}
|
2013-12-01 10:16:35 +00:00
|
|
|
|
|
|
|
@internal.var = internal constant i32 0
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: @internal.var = internal constant i32 0{{$}}
|
2013-12-01 10:16:35 +00:00
|
|
|
|
|
|
|
@available_externally.var = available_externally constant i32 0
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: @available_externally.var = available_externally constant i32 0{{$}}
|
2013-12-01 10:16:35 +00:00
|
|
|
|
|
|
|
@linkonce.var = linkonce constant i32 0
|
2015-01-19 15:16:06 +00:00
|
|
|
; CHECK: @linkonce.var = linkonce constant i32 0, comdat{{$}}
|
2013-12-01 10:16:35 +00:00
|
|
|
|
|
|
|
@weak.var = weak constant i32 0
|
2015-01-19 15:16:06 +00:00
|
|
|
; CHECK: @weak.var = weak constant i32 0, comdat{{$}}
|
2013-12-01 10:16:35 +00:00
|
|
|
|
|
|
|
@linkonce_odr.var = linkonce_odr constant i32 0
|
2015-01-19 15:16:06 +00:00
|
|
|
; CHECK: @linkonce_odr.var = linkonce_odr constant i32 0, comdat{{$}}
|
2013-12-01 10:16:35 +00:00
|
|
|
|
|
|
|
@linkonce_odr_auto_hide.var = linkonce_odr_auto_hide constant i32 0
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: @linkonce_odr_auto_hide.var = constant i32 0{{$}}
|
2013-12-01 10:16:35 +00:00
|
|
|
|
|
|
|
@external.var = external constant i32
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: @external.var = external constant i32{{$}}
|
2013-12-01 10:16:35 +00:00
|
|
|
|
|
|
|
@dllexport.var = dllexport global i32 0
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: @dllexport.var = dllexport global i32 0{{$}}
|
2013-12-01 10:16:35 +00:00
|
|
|
|
|
|
|
@dllimport.var = dllimport global i32
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: @dllimport.var = external dllimport global i32{{$}}
|
2013-12-01 10:16:35 +00:00
|
|
|
|
|
|
|
define private void @private()
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: define private void @private() {
|
2013-12-01 10:16:35 +00:00
|
|
|
{
|
2015-01-08 16:11:18 +00:00
|
|
|
ret void
|
2013-12-01 10:16:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
define linker_private void @linker_private()
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: define private void @linker_private() {
|
2013-12-01 10:16:35 +00:00
|
|
|
{
|
2015-01-08 16:11:18 +00:00
|
|
|
ret void
|
2013-12-01 10:16:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
define linker_private_weak void @linker_private_weak()
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: define private void @linker_private_weak() {
|
2013-12-01 10:16:35 +00:00
|
|
|
{
|
2015-01-08 16:11:18 +00:00
|
|
|
ret void
|
2013-12-01 10:16:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
define linker_private_weak_def_auto void @linker_private_weak_def_auto()
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: define void @linker_private_weak_def_auto() {
|
2013-12-01 10:16:35 +00:00
|
|
|
{
|
2015-01-08 16:11:18 +00:00
|
|
|
ret void
|
2013-12-01 10:16:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
define internal void @internal()
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: define internal void @internal() {
|
2013-12-01 10:16:35 +00:00
|
|
|
{
|
2015-01-08 16:11:18 +00:00
|
|
|
ret void
|
2013-12-01 10:16:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
define available_externally void @available_externally()
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: define available_externally void @available_externally() {
|
2013-12-01 10:16:35 +00:00
|
|
|
{
|
2015-01-08 16:11:18 +00:00
|
|
|
ret void
|
2013-12-01 10:16:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
define linkonce void @linkonce()
|
2015-01-19 15:16:06 +00:00
|
|
|
; CHECK: define linkonce void @linkonce() comdat {
|
2013-12-01 10:16:35 +00:00
|
|
|
{
|
2015-01-08 16:11:18 +00:00
|
|
|
ret void
|
2013-12-01 10:16:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
define weak void @weak()
|
2015-01-19 15:16:06 +00:00
|
|
|
; CHECK: define weak void @weak() comdat {
|
2013-12-01 10:16:35 +00:00
|
|
|
{
|
2015-01-08 16:11:18 +00:00
|
|
|
ret void
|
2013-12-01 10:16:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
define linkonce_odr void @linkonce_odr()
|
2015-01-19 15:16:06 +00:00
|
|
|
; CHECK: define linkonce_odr void @linkonce_odr() comdat {
|
2013-12-01 10:16:35 +00:00
|
|
|
{
|
2015-01-08 16:11:18 +00:00
|
|
|
ret void
|
2013-12-01 10:16:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
define linkonce_odr_auto_hide void @linkonce_odr_auto_hide()
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: define void @linkonce_odr_auto_hide() {
|
2013-12-01 10:16:35 +00:00
|
|
|
{
|
2015-01-08 16:11:18 +00:00
|
|
|
ret void
|
2013-12-01 10:16:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
define external void @external()
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: define void @external() {
|
2013-12-01 10:16:35 +00:00
|
|
|
{
|
2015-01-08 16:11:18 +00:00
|
|
|
ret void
|
2013-12-01 10:16:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
declare dllimport void @dllimport()
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: declare dllimport void @dllimport(){{$}}
|
2013-12-01 10:16:35 +00:00
|
|
|
|
|
|
|
define dllexport void @dllexport()
|
2015-01-08 16:11:18 +00:00
|
|
|
; CHECK: define dllexport void @dllexport() {
|
2013-12-01 10:16:35 +00:00
|
|
|
{
|
2015-01-08 16:11:18 +00:00
|
|
|
ret void
|
2013-12-01 10:16:35 +00:00
|
|
|
}
|