1 ; RUN: llvm-as < %s | llc -mtriple=i386-unknown-linux-gnu | FileCheck %s -check-prefix=LINUX
2 ; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin9.7 | FileCheck %s -check-prefix=DARWIN
6 @G1 = common global i32 0
8 ; LINUX: .type G1,@object
9 ; LINUX: .section .gnu.linkonce.b.G1,"aw",@nobits
12 ; DARWIN: .comm _G1,4,2
17 ; const int G2 __attribute__((weak)) = 42;
18 @G2 = weak_odr constant i32 42
21 ; TODO: linux drops this into .rodata, we drop it into ".gnu.linkonce.r.G2"
23 ; DARWIN: .section __TEXT,__const_coal,coalesced
28 ; int * const G3 = &G1;
29 @G3 = constant i32* @G1
37 ; _Complex long long const G4 = 34;
38 @G4 = constant {i64,i64} { i64 34, i64 0 }
60 @"foo bar" = linkonce global i32 42
62 ; LINUX: .type foo_20_bar,@object
63 ; LINUX:.section .gnu.linkonce.d.foo_20_bar,"aw",@progbits
64 ; LINUX: .weak foo_20_bar
67 ; DARWIN: .section __DATA,__datacoal_nt,coalesced
68 ; DARWIN: .globl "_foo bar"
69 ; DARWIN: .weak_definition "_foo bar"
73 @G6 = weak_odr constant [1 x i8] c"\01"
75 ; LINUX: .type G6,@object
76 ; LINUX: .section .gnu.linkonce.r.G6,"a",@progbits
80 ; LINUX: .ascii "\001"
82 ; DARWIN: .section __TEXT,__const_coal,coalesced
84 ; DARWIN: .weak_definition _G6
86 ; DARWIN: .ascii "\001"