[llvm-bugs] [Bug 25564] New: MSVC: attachment points at wrong subprogram for function

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Nov 17 18:26:46 PST 2015


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: unassignedbugs at nondot.org
          Reporter: alex at crichton.co
                CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151118/34079928/attachment.html>


More information about the llvm-bugs mailing list