File: common2.ll

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (28 lines) | stat: -rw-r--r-- 814 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
; REQUIRES: x86
; RUN: llvm-as %s -o %t1.o
; RUN: ld.lld %t1.o -o %t -shared -save-temps
; RUN: llvm-dis < %t.0.2.internalize.bc | FileCheck %s
; RUN: llvm-readobj --symbols %t | FileCheck %s --check-prefix=SHARED

target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@a = common global i8 0, align 8
; CHECK-DAG: @a = common global i8 0, align 8

@b = common hidden global i32 0, align 4
define i32 @f() {
  %t = load i32, ptr @b, align 4
  ret i32 %t
}
; CHECK-DAG: @b = internal global i32 0, align 4

; SHARED: Symbol {
; SHARED:   Name: a
; SHARED-NEXT:   Value:
; SHARED-NEXT:   Size: 1
; SHARED-NEXT:   Binding: Global
; SHARED-NEXT:   Type: Object
; SHARED-NEXT:   Other: 0
; SHARED-NEXT:   Section: .bss
; SHARED-NEXT: }