2013-09-04 16:35:48 +02:00
|
|
|
; RUN: llvm-link %s %p/unnamed-addr1-b.ll -S -o - | FileCheck %s
|
2011-01-13 06:12:34 +01:00
|
|
|
|
2011-01-15 09:15:00 +01:00
|
|
|
; Only in this file
|
2013-09-04 16:40:49 +02:00
|
|
|
@global-a = common global i32 0
|
|
|
|
; CHECK-DAG: @global-a = common global i32 0
|
|
|
|
@global-b = common unnamed_addr global i32 0
|
|
|
|
; CHECK-DAG: @global-b = common unnamed_addr global i32 0
|
2011-01-13 06:12:34 +01:00
|
|
|
|
2013-09-04 16:59:03 +02:00
|
|
|
define weak void @func-a() { ret void }
|
|
|
|
; CHECK-DAG: define weak void @func-a() {
|
|
|
|
define weak void @func-b() unnamed_addr { ret void }
|
|
|
|
; CHECK-DAG: define weak void @func-b() unnamed_addr {
|
|
|
|
|
2011-01-15 09:15:00 +01:00
|
|
|
; Other file has unnamed_addr definition
|
2013-09-04 16:40:49 +02:00
|
|
|
@global-c = common unnamed_addr global i32 0
|
|
|
|
; CHECK-DAG: @global-c = common unnamed_addr global i32 0
|
|
|
|
@global-d = external global i32
|
|
|
|
; CHECK-DAG: @global-d = global i32 42
|
|
|
|
@global-e = external unnamed_addr global i32
|
|
|
|
; CHECK-DAG: @global-e = unnamed_addr global i32 42
|
|
|
|
@global-f = weak global i32 42
|
|
|
|
; CHECK-DAG: @global-f = global i32 42
|
2011-01-13 06:12:34 +01:00
|
|
|
|
2014-06-06 03:20:28 +02:00
|
|
|
@alias-a = weak global i32 42
|
|
|
|
; CHECK-DAG: @alias-a = alias i32* @global-f
|
|
|
|
@alias-b = weak unnamed_addr global i32 42
|
|
|
|
; CHECK-DAG: @alias-b = unnamed_addr alias i32* @global-f
|
|
|
|
|
2013-09-04 16:59:03 +02:00
|
|
|
declare void @func-c()
|
|
|
|
; CHECK-DAG: define weak void @func-c() {
|
|
|
|
define weak void @func-d() { ret void }
|
|
|
|
; CHECK-DAG: define weak void @func-d() {
|
|
|
|
define weak void @func-e() unnamed_addr { ret void }
|
|
|
|
; CHECK-DAG: define weak void @func-e() unnamed_addr {
|
|
|
|
|
2011-01-15 09:15:00 +01:00
|
|
|
; Other file has non-unnamed_addr definition
|
2013-09-04 16:40:49 +02:00
|
|
|
@global-g = common unnamed_addr global i32 0
|
|
|
|
; CHECK-DAG: @global-g = common global i32 0
|
|
|
|
@global-h = external global i32
|
|
|
|
; CHECK-DAG: @global-h = global i32 42
|
|
|
|
@global-i = external unnamed_addr global i32
|
|
|
|
; CHECK-DAG: @global-i = global i32 42
|
|
|
|
@global-j = weak global i32 42
|
|
|
|
; CHECK-DAG: @global-j = global i32 42
|
2013-09-04 16:59:03 +02:00
|
|
|
|
2014-06-06 03:20:28 +02:00
|
|
|
@alias-c = weak global i32 42
|
|
|
|
; CHECK-DAG: @alias-c = alias i32* @global-f
|
|
|
|
@alias-d = weak unnamed_addr global i32 42
|
|
|
|
; CHECK-DAG: @alias-d = alias i32* @global-f
|
|
|
|
|
|
|
|
|
2013-09-04 16:59:03 +02:00
|
|
|
declare void @func-g()
|
|
|
|
; CHECK-DAG: define weak void @func-g() {
|
|
|
|
define weak void @func-h() { ret void }
|
|
|
|
; CHECK-DAG: define weak void @func-h() {
|
|
|
|
define weak void @func-i() unnamed_addr { ret void }
|
|
|
|
; CHECK-DAG: define weak void @func-i() {
|