1; RUN: llc < %s -filetype=obj | llvm-readobj - --codeview | FileCheck %s 2; RUN: llc --try-experimental-debuginfo-iterators < %s -filetype=obj | llvm-readobj - --codeview | FileCheck %s 3 4; Tests that CodeView integer types are generated even when using Clang's old integer type names. 5 6; C++ source to regenerate: 7; $ cat t.cpp 8; void usevars(long, ...); 9; void f() { 10; long l1 = 0; 11; unsigned long l2 = 0; 12; usevars(l1, l2); 13; } 14; $ clang t.cpp -S -emit-llvm -g -gcodeview -o t.ll -target x86_64-pc-windows-msvc19.0.23918 15 16; CHECK: LocalSym { 17; CHECK: Type: long (0x12) 18; CHECK: VarName: l1 19; CHECK: } 20; CHECK: LocalSym { 21; CHECK: Type: unsigned long (0x22) 22; CHECK: VarName: l2 23; CHECK: } 24 25; ModuleID = '/usr/local/google/home/blaikie/dev/scratch/t.cpp' 26source_filename = "/usr/local/google/home/blaikie/dev/scratch/t.cpp" 27target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 28target triple = "x86_64-pc-windows-msvc19.0.23918" 29 30; Function Attrs: mustprogress noinline optnone uwtable 31define dso_local void @"?f@@YAXXZ"() #0 !dbg !8 { 32entry: 33 %l1 = alloca i32, align 4 34 %l2 = alloca i32, align 4 35 call void @llvm.dbg.declare(metadata ptr %l1, metadata !13, metadata !DIExpression()), !dbg !15 36 store i32 0, ptr %l1, align 4, !dbg !15 37 call void @llvm.dbg.declare(metadata ptr %l2, metadata !16, metadata !DIExpression()), !dbg !18 38 store i32 0, ptr %l2, align 4, !dbg !18 39 %0 = load i32, ptr %l2, align 4, !dbg !19 40 %1 = load i32, ptr %l1, align 4, !dbg !19 41 call void (i32, ...) @"?usevars@@YAXJZZ"(i32 %1, i32 %0), !dbg !19 42 ret void, !dbg !20 43} 44 45; Function Attrs: nofree nosync nounwind readnone speculatable willreturn 46declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 47 48declare dso_local void @"?usevars@@YAXJZZ"(i32, ...) #2 49 50attributes #0 = { mustprogress noinline optnone uwtable "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } 51attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } 52attributes #2 = { "frame-pointer"="none" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } 53 54!llvm.dbg.cu = !{!0} 55!llvm.module.flags = !{!2, !3, !4, !5, !6} 56!llvm.ident = !{!7} 57 58!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0 (git@github.com:llvm/llvm-project.git 3709fb72c86bea1f0e6c51ab334ed6417cbe1c07)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) 59!1 = !DIFile(filename: "/usr/local/google/home/blaikie/dev/scratch/t.cpp", directory: "/usr/local/google/home/blaikie/dev/llvm/src", checksumkind: CSK_MD5, checksum: "a8e7ccc989ea91d67d3cb95afa046aa5") 60!2 = !{i32 2, !"CodeView", i32 1} 61!3 = !{i32 2, !"Debug Info Version", i32 3} 62!4 = !{i32 1, !"wchar_size", i32 2} 63!5 = !{i32 7, !"PIC Level", i32 2} 64!6 = !{i32 7, !"uwtable", i32 1} 65!7 = !{!"clang version 14.0.0 (git@github.com:llvm/llvm-project.git 3709fb72c86bea1f0e6c51ab334ed6417cbe1c07)"} 66!8 = distinct !DISubprogram(name: "f", linkageName: "?f@@YAXXZ", scope: !9, file: !9, line: 2, type: !10, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12) 67!9 = !DIFile(filename: "scratch/t.cpp", directory: "/usr/local/google/home/blaikie/dev", checksumkind: CSK_MD5, checksum: "a8e7ccc989ea91d67d3cb95afa046aa5") 68!10 = !DISubroutineType(types: !11) 69!11 = !{null} 70!12 = !{} 71!13 = !DILocalVariable(name: "l1", scope: !8, file: !9, line: 3, type: !14) 72!14 = !DIBasicType(name: "long int", size: 32, encoding: DW_ATE_signed) 73!15 = !DILocation(line: 3, scope: !8) 74!16 = !DILocalVariable(name: "l2", scope: !8, file: !9, line: 4, type: !17) 75!17 = !DIBasicType(name: "long unsigned int", size: 32, encoding: DW_ATE_unsigned) 76!18 = !DILocation(line: 4, scope: !8) 77!19 = !DILocation(line: 5, scope: !8) 78!20 = !DILocation(line: 6, scope: !8) 79