https://llvm.org/bugs/show_bug.cgi?id=25564
Bug ID: 25564 Summary: MSVC: attachment points at wrong subprogram for function Product: libraries Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: DebugInfo Assignee: unassignedb...@nondot.org Reporter: a...@crichton.co CC: llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 15309 --> https://llvm.org/bugs/attachment.cgi?id=15309&action=edit Failing IR When compiling the attached IR with llc, I get: !dbg attachment points at wrong subprogram for function !1 = distinct !DISubprogram(name: "main", linkageName: "_ZN19backtrace_debuginfo4mainE", scope: !3, file: !2, line: 1, type: !4, isLocal: true, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, templateParams: !5, variables: !5) void ()* @foo call void @bar(), !dbg !19 !19 = !DILocation(line: 1219, scope: !20, inlinedAt: !21) !25 = distinct !DILexicalBlock(scope: !26, file: !2, line: 1, column: 10) !26 = distinct !DISubprogram(name: "main", linkageName: "_ZN19backtrace_debuginfo4mainE", scope: !3, file: !2, line: 1, type: !4, isLocal: true, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, templateParams: !5, variables: !5) LLVM ERROR: Broken function found, compilation aborted! But when the target is changed to x86_64-unknown-linux-gnu the file compiles successfully. I'm not 100% sure that we correctly emit debuginfo in the first place (not my area of expertise), and this may also be related to r252219 but I figured it was odd at least that it failed to compile with an MSVC target yet successfully compiled for a Linux one! -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs