From: Yonghong Song Date: Thu, 17 Feb 2022 16:38:28 +0000 (-0800) Subject: fix a llvm compilation error due to header file reshuffle X-Git-Tag: accepted/tizen/unified/20230703.093324~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01afcaac0c0fe159a06bc52de87d6387ac8b2dff;p=platform%2Fupstream%2Fbcc.git 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 Signed-off-by: Łukasz Stelmach --- diff --git a/src/cc/bcc_debug.cc b/src/cc/bcc_debug.cc index 77d681ac..a7a865f4 100644 --- a/src/cc/bcc_debug.cc +++ b/src/cc/bcc_debug.cc @@ -19,6 +19,9 @@ #include #include +#if LLVM_MAJOR_VERSION >= 15 +#include +#endif #include #include #include