[PATCH] D70696: [DebugInfo] Support to emit debugInfo for extern variables

Paul Robinson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 2 11:11:03 PST 2019


probinson added a comment.

For the case:

  cat def.c
      int global_var = 2;

def.o should have debug info for the definition of global_var.
For the case:

  cat noref.c
      extern int global_var;
      int main() {}

I would not expect to see debug info for the declaration of global_var.
For the case:

  cat ref.c
      extern int global_var;
      int main() { return global_var; }

I *do* expect to see debug info for the declaration of global_var.

Does bpf require debug info for the declaration of global_var in `noref.c` ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70696





More information about the cfe-commits mailing list