fix a llvm compilation error due to header file reshuffle 30/294730/1
authorYonghong Song <yhs@fb.com>
Thu, 17 Feb 2022 16:38:28 +0000 (08:38 -0800)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Fri, 23 Jun 2023 20:06:04 +0000 (22:06 +0200)
commit01afcaac0c0fe159a06bc52de87d6387ac8b2dff
treee95626836b45c4114dcd674b1c0962ede7b03bc7
parent1df311abbacd77d7a9a97deb8b2e807f069de8cb
fix a llvm compilation error due to header file reshuffle

llvm upstream https://reviews.llvm.org/D119723 removed
header file llvm/DebugInfo/DWARF/DWARFCompileUnit.h from
llvm/DebugInfo/DWARF/DWARFContext.h and this
caused bcc compilation failure:

  ...
  .../src/cc/bcc_debug.cc: In member function ‘void ebpf::SourceDebugger::dump()’:
  .../src/cc/bcc_debug.cc:186:69: error: no matching function for call to
   ‘llvm::DWARFContext::getLineTableForUnit(llvm::DWARFCompileUnit*&)’
     const DWARFLineTable *LineTable = DwarfCtx->getLineTableForUnit(CU);
                                                                     ^
  In file included from /home/yhs/work/bcc/src/cc/bcc_debug.cc:22:
  ...

Similar to fix in https://reviews.llvm.org/D119723, let us explicitly
add llvm/DebugInfo/DWARF/DWARFCompileUnit.h in the .cc file.

Change-Id: I528537d1cccfbeffb95ff7bccf926bed8eb41a78
Origin: upstream, https://github.com/iovisor/bcc/commit/e4d899ce335e263999c2664c9770c53018fc6c51
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
src/cc/bcc_debug.cc