2021-04-23 09:24:17 +02:00
|
|
|
; RUN: llvm-as < %s -o %t.bc -data-layout=A5 2>&1 | FileCheck -check-prefixes=AS %s
|
|
|
|
; RUN: llvm-dis < %t.bc | FileCheck -check-prefixes=DIS %s
|
|
|
|
; RUN: opt < %s -S -data-layout=A5 2>&1 | FileCheck -check-prefixes=AS %s
|
|
|
|
; RUN: opt < %t.bc -S | FileCheck -check-prefixes=DIS %s
|
2018-01-30 23:32:39 +01:00
|
|
|
|
|
|
|
define void @foo() {
|
|
|
|
entry:
|
|
|
|
; DIS: target datalayout = "A5"
|
2020-05-15 22:23:14 +02:00
|
|
|
; DIS: %tmp = alloca i32, align 4, addrspace(5)
|
2018-01-30 23:32:39 +01:00
|
|
|
%tmp = alloca i32, addrspace(5)
|
|
|
|
call void @llvm.dbg.value(
|
|
|
|
metadata i8* undef,
|
|
|
|
metadata !DILocalVariable(scope: !1),
|
|
|
|
metadata !DIExpression())
|
|
|
|
; AS: llvm.dbg.value intrinsic requires a !dbg attachment
|
|
|
|
; AS: warning: ignoring invalid debug info in <stdin>
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.dbg.value(metadata, metadata, metadata)
|
|
|
|
|
|
|
|
!llvm.module.flags = !{!0}
|
|
|
|
!0 = !{i32 2, !"Debug Info Version", i32 3}
|
|
|
|
!1 = distinct !DISubprogram(name: "foo")
|