brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.6 KiB · af78789 Raw
57 lines · plain
1; Test that the declaration for UDTs won't be "<unknown>" or "\<unknown>".2; Rustc sets the location of some builtin types to this string.3 4; REQUIRES: system-windows5; RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s6; RUN: lldb-test symbols %t.exe | FileCheck %s7 8; there shouldn't be a declaration (would be between size and compiler_type)9; CHECK: Type{{.*}} , name = "Foo", size = 1, compiler_type = {{.*}} struct Foo {10 11; This is edited output from clang  simulates rustc behavior (see !17)12; Source:13; struct Foo {};14;15; int main() { Foo f; }16 17 18; ModuleID = 'main.cpp'19source_filename = "main.cpp"20target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"21target triple = "x86_64-pc-windows-msvc19.44.35207"22 23%struct.Foo = type { i8 }24 25; Function Attrs: mustprogress noinline norecurse nounwind optnone uwtable26define dso_local noundef i32 @main() #0 !dbg !9 {27  %1 = alloca %struct.Foo, align 128    #dbg_declare(ptr %1, !14, !DIExpression(), !16)29  ret i32 0, !dbg !1630}31 32attributes #0 = { mustprogress noinline norecurse nounwind optnone uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }33 34!llvm.dbg.cu = !{!0}35!llvm.module.flags = !{!2, !3, !4, !5, !6, !7}36!llvm.ident = !{!8}37 38!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 20.1.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)39!1 = !DIFile(filename: "main.cpp", directory: "F:\\Dev\\rust-dbg-test", checksumkind: CSK_MD5, checksum: "b8942260dadf9ec35328889f05afb954")40!2 = !{i32 2, !"CodeView", i32 1}41!3 = !{i32 2, !"Debug Info Version", i32 3}42!4 = !{i32 1, !"wchar_size", i32 2}43!5 = !{i32 8, !"PIC Level", i32 2}44!6 = !{i32 7, !"uwtable", i32 2}45!7 = !{i32 1, !"MaxTLSAlign", i32 65536}46!8 = !{!"clang version 20.1.6"}47!9 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 3, type: !10, scopeLine: 3, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !13)48!10 = !DISubroutineType(types: !11)49!11 = !{!12}50!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)51!13 = !{}52!14 = !DILocalVariable(name: "f", scope: !9, file: !1, line: 3, type: !15)53!15 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", file: !17, line: 1, size: 8, flags: DIFlagTypePassByValue, elements: !13, identifier: ".?AUFoo@@")54!16 = !DILocation(line: 3, scope: !9)55; This is how rustc emits some types56!17 = !DIFile(filename: "<unknown>", directory: "")57