[PATCH] D29310: Fix DwarfDebug assertions with LTO mixing -g and -gmlt

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 31 11:40:37 PST 2017


dblaikie added inline comments.


================
Comment at: test/DebugInfo/X86/dbg-abstract-vars-g-gmlt.ll:1
+; RUN: llc < %s -filetype=obj | llvm-dwarfdump - -debug-dump=info | FileCheck %s
+;
----------------
Here's the simplest example I have for this (also doesn't require optimizations either at compile time or after the link step (though they can be used to tidy up the IR a little):

  // first file
  void f1();
  inline __attribute__((always_inline)) void f2(int) {
    f1();
  }
  void f3() {
    f2();
  }

  // second file
  void f() {
  }
    


================
Comment at: test/DebugInfo/X86/dbg-value-g-gmlt.ll:1
+; RUN: llc -filetype=obj < %s | llvm-dwarfdump - -debug-dump=info | FileCheck %s
+;
----------------
Interestingly, this still seems to trigger the assert:

  void f()
  void foo(int param) {
    if (param)
      f();
  }

  void foo(int);
  void bar() {
    foo(0);
  }

Which is vaguely worrying - since in this case the call to foo is not/cannot be optimized away, so I'm not sure what the assertion is telling us here. There should be instructions for the function & so we shouldn't be in that codepath.


https://reviews.llvm.org/D29310





More information about the llvm-commits mailing list