File: cfstring.ll

package info (click to toggle)
llvm-toolchain-9 1%3A9.0.1-16
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 882,436 kB
  • sloc: cpp: 4,167,636; ansic: 714,256; asm: 457,610; python: 155,927; objc: 65,094; sh: 42,856; lisp: 26,908; perl: 7,786; pascal: 7,722; makefile: 6,881; ml: 5,581; awk: 3,648; cs: 2,027; xml: 888; javascript: 381; ruby: 156
file content (36 lines) | stat: -rw-r--r-- 1,557 bytes parent folder | download | duplicates (17)
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
29
30
31
32
33
34
35
36
; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s
; <rdar://problem/10564621>

%0 = type opaque
%struct.NSConstantString = type { i32*, i32, i8*, i32 }

; Make sure that the string ends up the correct section.

; CHECK:        .section __TEXT,__cstring
; CHECK-NEXT: L_.str3:

; CHECK:        .section  __DATA,__cfstring
; CHECK-NEXT:   .p2align  4
; CHECK-NEXT: L__unnamed_cfstring_4:
; CHECK-NEXT:   .quad  ___CFConstantStringClassReference
; CHECK-NEXT:   .long  1992
; CHECK-NEXT:   .space  4
; CHECK-NEXT:   .quad  L_.str3
; CHECK-NEXT:   .long  0
; CHECK-NEXT:   .space  4

@isLogVisible = global i8 0, align 1
@__CFConstantStringClassReference = external global [0 x i32]
@.str3 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
@_unnamed_cfstring_4 = private constant %struct.NSConstantString { i32* getelementptr inbounds ([0 x i32], [0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), i32 1992, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str3, i32 0, i32 0), i32 0 }, section "__DATA,__cfstring"
@null.array = weak_odr constant [1 x i8] zeroinitializer, align 1

define linkonce_odr void @bar() nounwind ssp align 2 {
entry:
  %stack = alloca i8*, align 4
  %call = call %0* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %0* (i8*, i8*, %0*)*)(i8* null, i8* null, %0* bitcast (%struct.NSConstantString* @_unnamed_cfstring_4 to %0*))
  store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @null.array, i32 0, i32 0), i8** %stack, align 4
  ret void
}

declare i8* @objc_msgSend(i8*, i8*, ...) nonlazybind