[PATCH] D27962: Get function start line number from DWARF info

Eric Christopher via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 3 19:06:27 PST 2017


echristo added a comment.

I'm not sure why you need this as part of the line number lookup. Can you explain a bit more how the code that uses this works and why you need this here?

Thanks!



================
Comment at: lib/DebugInfo/DWARF/DWARFContext.cpp:91
+  char* demangle_result = itaniumDemangle(FunctionName.c_str(),
+                                          demangle_func_buf, &buf_len, nullptr);
+  std::string demangled_func_name;
----------------
aprantl wrote:
> Why do you need to demangle the name here?
Agreed. Also, this needs to be llvm style.


================
Comment at: lib/DebugInfo/DWARF/DWARFContext.cpp:105
+
+  for (size_t i = 0; i < CU->getNumDIEs(); ++i) {
+    const DWARFDie die = CU->getDIEAtIndex(i);
----------------
aprantl wrote:
> Shouldn't this be using accelerator tables if available?
Possibly, but let's add those on after...


https://reviews.llvm.org/D27962





More information about the llvm-commits mailing list