[PATCH] D110294: [DebugInfo] Fix imported declarations of inlined subprograms

Kristina Bessonova via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 23 02:58:20 PDT 2021


krisb added a comment.

Thank you for the patch! I thought about exactly the same change :) 
But I also started thinking that we may have similar problems for other entities that have inlined function as a scope.
For example, a type defined within a function will also have an empty parent subprogram:

  inline __attribute__((always_inline))
  int foo() {
    struct S { int a; int b; };
    S s({4,5});
    return s.a;
  }
  
  int main() {
    return foo();
  }

It would be great if we could fix all the issues with inlined functions here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110294/new/

https://reviews.llvm.org/D110294



More information about the llvm-commits mailing list