ef006eb0bc
This patch adds llvm::codeview::SourceLanguage entries, DWARF translations, and PDB source file extensions in LLVM and allow LLDB's PDB parsers to recognize them correctly. The CV_CFL_LANG enum in the Visual Studio 2022 documentation https://learn.microsoft.com/en-us/visualstudio/debugger/debug-interface-access/cv-cfl-lang defines: ``` CV_CFL_OBJC = 0x11, CV_CFL_OBJCXX = 0x12, ``` Since the initial commit in D24317, ObjC was emitted as C language and ObjC++ as Masm. Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D146221
36 lines
1.5 KiB
LLVM
36 lines
1.5 KiB
LLVM
; RUN: llc < %s | FileCheck %s --check-prefix=ASM
|
|
; RUN: llc -filetype=obj < %s | llvm-readobj --codeview - | FileCheck %s --check-prefix=OBJ
|
|
|
|
; ASM: .short 4412 # Record kind: S_COMPILE3
|
|
; ASM-NEXT: .long 18 # Flags and language
|
|
|
|
; OBJ: Kind: S_COMPILE3 (0x113C)
|
|
; OBJ-NEXT: Language: ObjCpp (0x12)
|
|
|
|
; ModuleID = 'objcpp.mm'
|
|
source_filename = "objcpp.mm"
|
|
target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-pc-windows-msvc"
|
|
|
|
; Function Attrs: uwtable
|
|
define void @"?f@@YAXXZ"() #0 !dbg !5 {
|
|
entry:
|
|
ret void, !dbg !9
|
|
}
|
|
|
|
attributes #0 = { uwtable "target-cpu"="x86-64" }
|
|
|
|
!llvm.module.flags = !{!0, !1, !2}
|
|
!llvm.dbg.cu = !{!3}
|
|
|
|
!0 = !{i32 8, !"PIC Level", i32 2}
|
|
!1 = !{i32 2, !"CodeView", i32 1}
|
|
!2 = !{i32 2, !"Debug Info Version", i32 3}
|
|
!3 = distinct !DICompileUnit(language: DW_LANG_ObjC_plus_plus, file: !4, producer: "clang version 17.0.0 (https://github.com/llvm/llvm-project a8e9beca6bee1f248ef4be7892802c4d091b7fcb)", isOptimized: false, runtimeVersion: 1, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
|
|
!4 = !DIFile(filename: "objcpp.mm", directory: "src", checksumkind: CSK_MD5, checksum: "e6ab1d5b7f82464c963a8522037dfa72")
|
|
!5 = distinct !DISubprogram(name: "f", linkageName: "?f@@YAXXZ", scope: !4, file: !4, line: 1, type: !6, scopeLine: 1, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !3, retainedNodes: !8)
|
|
!6 = !DISubroutineType(types: !7)
|
|
!7 = !{null}
|
|
!8 = !{}
|
|
!9 = !DILocation(line: 1, scope: !5)
|