Imported Upstream version 6.10.0.49

Former-commit-id: 1d6753294b2993e1fbf92de9366bb9544db4189b
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2020-01-16 16:38:04 +00:00
parent d94e79959b
commit 468663ddbb
48518 changed files with 2789335 additions and 61176 deletions

View File

@ -0,0 +1,11 @@
; This test ensures that we get a bitcast constant expression in and out,
; not a sitofp constant expression.
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
; RUN: verify-uselistorder < %s
; CHECK: bitcast (
@G = external global i32
define float @tryit(i32 %A) {
ret float bitcast( i32 ptrtoint (i32* @G to i32) to float)
}

View File

@ -0,0 +1,13 @@
; RUN: llvm-as < %s | llvm-dis -disable-output
; RUN: verify-uselistorder < %s
; PR4373
@foo = weak global { i32 } zeroinitializer
@bar = weak global i32 0
define void @test() {
entry:
store { i32 } zeroinitializer, { i32 }* @foo
store i32 1, i32* @bar
ret void
}

View File

@ -0,0 +1,9 @@
; The input uses the older (r236428) form without a dwoId field. This should
; default to 0, which is not displayed at all in the textual representation.
;
; RUN: llvm-dis %s.bc -o - | FileCheck %s
; CHECK: distinct !DICompileUnit
; CHECK-NOT: dwoId:
!named = !{!0}
!0 = !DICompileUnit(language: 12, file: !1)
!1 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")

View File

@ -0,0 +1,20 @@
; RUN: llvm-dis -o - %s.bc | FileCheck %s
@g = common global i8 0, align 4, !dbg !0
!llvm.dbg.cu = !{!1}
!llvm.module.flags = !{!7, !8}
!0 = distinct !DIGlobalVariable(name: "g", scope: !1, file: !2, line: 1, type: !5, isLocal: false, isDefinition: true, expr: !6)
!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang (llvm/trunk 288154)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, globals: !4)
!2 = !DIFile(filename: "a.c", directory: "/")
!3 = !{}
!4 = !{!0}
!5 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
; Old-style DIExpression bitcode records using DW_OP_bit_piece should be
; upgraded to DW_OP_LLVM_fragment.
;
; CHECK: !DIExpression(DW_OP_LLVM_fragment, 8, 8)
!6 = !DIExpression(DW_OP_bit_piece, 8, 8)
!7 = !{i32 2, !"Dwarf Version", i32 4}
!8 = !{i32 2, !"Debug Info Version", i32 3}

Binary file not shown.

View File

@ -0,0 +1,35 @@
; RUN: llvm-dis -o - %s.bc | FileCheck %s
%class.A = type { i32, i32, i32, i32 }
define void @_Z3fooi(%class.A* sret %agg.result) #0 !dbg !3 {
; CHECK: call void @llvm.dbg.declare({{.*}}, metadata !DIExpression()), !dbg
call void @llvm.dbg.declare(metadata %class.A* %agg.result, metadata !13, metadata !16), !dbg !17
ret void, !dbg !17
}
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
attributes #0 = { ssp }
attributes #1 = { nounwind readnone }
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!2}
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
!1 = !DIFile(filename: "a.cc", directory: "/tmp")
!2 = !{i32 1, !"Debug Info Version", i32 3}
!3 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", scope: !1, file: !1, line: 4, type: !4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0)
!4 = !DISubroutineType(types: !5)
!5 = !{!6}
!6 = !DICompositeType(tag: DW_TAG_class_type, name: "A", scope: !0, file: !1, line: 2, size: 128, align: 32, elements: !7)
!7 = !{!8, !10, !11, !12}
!8 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !1, file: !1, line: 2, baseType: !9, size: 32, align: 32)
!9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!10 = !DIDerivedType(tag: DW_TAG_member, name: "y", scope: !1, file: !1, line: 2, baseType: !9, size: 32, align: 32, offset: 32)
!11 = !DIDerivedType(tag: DW_TAG_member, name: "z", scope: !1, file: !1, line: 2, baseType: !9, size: 32, align: 32, offset: 64)
!12 = !DIDerivedType(tag: DW_TAG_member, name: "o", scope: !1, file: !1, line: 2, baseType: !9, size: 32, align: 32, offset: 96)
!13 = !DILocalVariable(name: "my_a", scope: !14, file: !1, line: 9, type: !15)
!14 = distinct !DILexicalBlock(scope: !3, file: !1, line: 4, column: 14)
!15 = !DIDerivedType(tag: DW_TAG_reference_type, file: !1, baseType: !6)
!16 = !DIExpression(DW_OP_deref)
!17 = !DILocation(line: 9, column: 5, scope: !3)

View File

@ -0,0 +1,27 @@
; RUN: llvm-dis -o - %s.bc | FileCheck %s
!llvm.dbg.cu = !{!1}
!llvm.module.flags = !{!20, !21}
!0 = distinct !DIGlobalVariable(name: "g", scope: !1, file: !2, line: 1, type: !5, isLocal: false, isDefinition: true)
!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang (llvm/trunk 300520)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, globals: !4)
!2 = !DIFile(filename: "a.c", directory: "/")
!3 = !{}
!4 = !{!10, !11, !12, !13}
!5 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
; DW_OP_deref should be moved to the back of the expression.
;
; CHECK: !DIExpression(DW_OP_plus_uconst, 0, DW_OP_deref, DW_OP_LLVM_fragment, 8, 8)
!6 = !DIExpression(DW_OP_deref, DW_OP_plus, 0, DW_OP_LLVM_fragment, 8, 8)
; CHECK: !DIExpression(DW_OP_plus_uconst, 0, DW_OP_deref)
!7 = !DIExpression(DW_OP_deref, DW_OP_plus, 0)
; CHECK: !DIExpression(DW_OP_plus_uconst, 1, DW_OP_deref)
!8 = !DIExpression(DW_OP_plus, 1, DW_OP_deref)
; CHECK: !DIExpression(DW_OP_deref)
!9 = !DIExpression(DW_OP_deref)
!10 = !DIGlobalVariableExpression(var: !0, expr: !6)
!11 = !DIGlobalVariableExpression(var: !0, expr: !7)
!12 = !DIGlobalVariableExpression(var: !0, expr: !8)
!13 = !DIGlobalVariableExpression(var: !0, expr: !9)
!20 = !{i32 2, !"Dwarf Version", i32 4}
!21 = !{i32 2, !"Debug Info Version", i32 3}

Binary file not shown.

View File

@ -0,0 +1,16 @@
; RUN: llvm-dis -o - %s.bc | FileCheck %s
!llvm.dbg.cu = !{!1}
!llvm.module.flags = !{!8, !9}
!0 = distinct !DIGlobalVariable(name: "g", scope: !1, file: !2, line: 1, type: !5, isLocal: false, isDefinition: true)
!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang (llvm/trunk 304286)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, globals: !4)
!2 = !DIFile(filename: "a.c", directory: "/")
!3 = !{}
!4 = !{!7}
!5 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
; CHECK: !DIExpression(DW_OP_constu, 42, DW_OP_minus)
!6 = !DIExpression(DW_OP_minus, 42)
!7 = !DIGlobalVariableExpression(var: !0, expr: !6)
!8 = !{i32 2, !"Dwarf Version", i32 4}
!9 = !{i32 2, !"Debug Info Version", i32 3}

View File

@ -0,0 +1,37 @@
; RUN: llvm-dis -o - %s.bc | FileCheck %s
; RUN: llvm-dis -o - %s.bc | llvm-as - | llvm-bcanalyzer -dump - | FileCheck %s --check-prefix=BC
; BC: GLOBAL_VAR_EXPR
; BC: GLOBAL_DECL_ATTACHMENT
; CHECK: @g = common global i32 0, align 4, !dbg ![[G:[0-9]+]]
; CHECK: @h = common global i32 0, align 4, !dbg ![[H:[0-9]+]]
; CHECK: ![[G]] = {{.*}}!DIGlobalVariableExpression(var: ![[GVAR:[0-9]+]], expr: !DIExpression(DW_OP_plus_uconst, 1))
; CHECK: ![[GVAR]] = distinct !DIGlobalVariable(name: "g",
; CHECK: DICompileUnit({{.*}}, imports: ![[IMPORTS:[0-9]+]]
; CHECK: !DIGlobalVariableExpression(var: ![[CVAR:[0-9]+]], expr: !DIExpression(DW_OP_constu, 23, DW_OP_stack_value))
; CHECK: ![[CVAR]] = distinct !DIGlobalVariable(name: "c",
; CHECK: ![[HVAR:[0-9]+]] = distinct !DIGlobalVariable(name: "h",
; CHECK: ![[IMPORTS]] = !{![[CIMPORT:[0-9]+]]}
; CHECK: ![[CIMPORT]] = !DIImportedEntity({{.*}}entity: ![[HVAR]]
; CHECK: ![[H]] = {{.*}}!DIGlobalVariableExpression(var: ![[HVAR]], expr: !DIExpression())
@g = common global i32 0, align 4, !dbg !0
@h = common global i32 0, align 4, !dbg !11
!llvm.dbg.cu = !{!1}
!llvm.module.flags = !{!6, !7, !8}
!llvm.ident = !{!9}
!0 = distinct !DIGlobalVariable(name: "g", scope: !1, file: !2, line: 1, type: !5, isLocal: false, isDefinition: true, expr: !DIExpression(DW_OP_plus, 1))
!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 4.0.0 (trunk 286129) (llvm/trunk 286128)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, imports: !3)
!2 = !DIFile(filename: "a.c", directory: "/")
!3 = !{!12}
!4 = !{!0, !10, !11}
!5 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!6 = !{i32 2, !"Dwarf Version", i32 4}
!7 = !{i32 2, !"Debug Info Version", i32 3}
!8 = !{i32 1, !"PIC Level", i32 2}
!9 = !{!"clang version 4.0.0 (trunk 286129) (llvm/trunk 286128)"}
!10 = distinct !DIGlobalVariable(name: "c", scope: !1, file: !2, line: 1, type: !5, isLocal: false, isDefinition: true, expr: !DIExpression(DW_OP_constu, 23, DW_OP_stack_value))
!11 = distinct !DIGlobalVariable(name: "h", scope: !1, file: !2, line: 2, type: !5, isLocal: false, isDefinition: true)
!12 = !DIImportedEntity(tag: DW_TAG_imported_declaration, file: !2, line: 1, scope: !1, entity: !11)

View File

@ -0,0 +1,31 @@
; RUN: llvm-dis -o - %s.bc | FileCheck %s
; CHECK: @g = common global i32 0, align 4, !dbg ![[G:[0-9]+]]
; CHECK-DAG: ![[G]] = distinct !DIGlobalVariableExpression(var: ![[GVAR:[0-9]+]], expr: !DIExpression())
; CHECK-DAG: distinct !DICompileUnit({{.*}}, globals: ![[GLOBS:[0-9]+]]
; CHECK-DAG: ![[GLOBS]] = !{![[GEXPR:[0-9]+]]}
; CHECK-DAG: ![[GEXPR]] = distinct !DIGlobalVariableExpression(var: ![[GVAR]], expr: !DIExpression())
; CHECK-DAG: ![[GVAR]] = !DIGlobalVariable(name: "g",
; Test the bitcode upgrade for DIGlobalVariable -> DIGlobalVariableExpression.
; ModuleID = 'a.c'
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.12.0"
@g = common global i32 0, align 4
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!6, !7, !8}
!llvm.ident = !{!9}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (clang-stage1-configure-RA_build 241111)", isOptimized: false, runtimeVersion: 0, emissionKind: 1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2)
!1 = !DIFile(filename: "a.c", directory: "/tmp")
!2 = !{}
!3 = !{!4}
!4 = !DIGlobalVariable(name: "g", scope: !0, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, variable: i32* @g)
!5 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!6 = !{i32 2, !"Dwarf Version", i32 2}
!7 = !{i32 2, !"Debug Info Version", i32 3}
!8 = !{i32 1, !"PIC Level", i32 2}
!9 = !{!"clang version 3.7.0 (clang-stage1-configure-RA_build 241111)"}

View File

@ -0,0 +1,22 @@
; Bitcode compiled with 3.7_rc2. 3.7 had redundant (but mandatory) tag fields
; on DILocalVariable.
;
; RUN: llvm-dis < %s.bc -o - | llvm-as | llvm-dis | FileCheck %s
; CHECK: ![[SP:[0-9]+]] = distinct !DISubprogram(name: "foo",{{.*}} variables: ![[VARS:[0-9]+]]
; CHECK: ![[VARS]] = !{![[PARAM:[0-9]+]], ![[AUTO:[0-9]+]]}
; CHECK: ![[PARAM]] = !DILocalVariable(name: "param", arg: 1, scope: ![[SP]])
; CHECK: ![[AUTO]] = !DILocalVariable(name: "auto", scope: ![[SP]])
!named = !{!0}
!llvm.module.flags = !{!6}
!llvm.dbg.cu = !{!4}
!0 = distinct !DISubprogram(name: "foo", scope: null, isLocal: false, isDefinition: true, isOptimized: false, variables: !1)
!1 = !{!2, !3}
!2 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "param", arg: 1, scope: !0)
!3 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "auto", scope: !0)
!4 = distinct !DICompileUnit(language: DW_LANG_C99, file: !5, subprograms: !{!0})
!5 = !DIFile(filename: "source.c", directory: "/dir")
!6 = !{i32 1, !"Debug Info Version", i32 3}

View File

@ -0,0 +1,23 @@
; RUN: llvm-dis %s.bc -o - | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.12.0"
@_ZN1N1iE = global i32 0, align 4, !dbg !0
!llvm.dbg.cu = !{!4}
!llvm.module.flags = !{!7, !8, !9}
!llvm.ident = !{!10}
!0 = distinct !DIGlobalVariable(name: "i", linkageName: "_ZN1N1iE", scope: !1, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true)
; Test bitcode upgrade for DINamespace without an exportSymbols field.
; CHECK: !DINamespace(name: "N", scope: null)
!1 = !DINamespace(name: "N", scope: null)
!2 = !DIFile(filename: "dinamespace.cpp", directory: "/")
!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!4 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 4.0.0 (trunk 283228) (llvm/trunk 283225)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, globals: !6)
!5 = !{}
!6 = !{!0}
!7 = !{i32 2, !"Dwarf Version", i32 4}
!8 = !{i32 2, !"Debug Info Version", i32 3}
!9 = !{i32 1, !"PIC Level", i32 2}
!10 = !{!"clang version 4.0.0 (trunk 283228) (llvm/trunk 283225)"}

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More