[PATCH] Allow DWARFDebugInfoEntryMinimal::getSubroutineName to resolve cross-unit references.

Alexey Samsonov vonosmas at gmail.com
Thu Sep 18 17:30:05 PDT 2014


================
Comment at: lib/DebugInfo/DWARFDebugInfoEntry.cpp:31
@@ +30,3 @@
+  Unit = Unit->getUnitSection().getUnitForOffset(*Offset);
+  assert(Unit && "Invalid DIE reference provided.");
+  return DIE.extractFast(Unit, Offset) ? Unit : nullptr;
----------------
If the reference is invalid, just return nullptr

================
Comment at: test/DebugInfo/Inputs/cross-cu-inlining.c:1
@@ +1,2 @@
+// a.c -- compile a.c and b.c with lto to generate the binary file
+int i;
----------------
Please provide a better description of how to turn this into an .o file (exact sequence of commands).

http://reviews.llvm.org/D5394






More information about the llvm-commits mailing list