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

Yonghong Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 2 11:29:29 PST 2019


yonghong-song added a comment.

@probinson for the question,

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

No, bpf only cares the referenced external global variables. So my current implementation does not emit debug info
for external global_var in noref.c.

It is just strange that gcc 7.3.1 (did not test, but maybe later gcc versions as well) emits the debuginfo (encoded in dwarf)
even if the external variable is not used in the current compilation unit. Not sure what is the rationale behind it.


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