Fix the build failure when perf jit is enabled
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 28964 Build 28963: arc lint + arc unit
Event Timeline
Comment Actions
The build is broken with:
{anonymous}::PerfJITEventListener::notifyObjectLoaded(llvm::JITEventListener::ObjectKey, const llvm::object::ObjectFile&, const llvm::RuntimeDyld::LoadedObjectInfo&)': /build/llvm-toolchain-snapshot-9~svn355786/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp:274:55: error: no matching function for call to 'llvm::DIContext::getLineInfoForAddressRange(uint64_t&, uint64_t&, llvm::DILineInfoSpecifier::FileLineInfoKind)' Addr, Size, FileLineInfoKind::AbsoluteFilePath); ^ In file included from /build/llvm-toolchain-snapshot-9~svn355786/include/llvm/DebugInfo/DWARF/DWARFContext.h:18:0, from /build/llvm-toolchain-snapshot-9~svn355786/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp:20: /build/llvm-toolchain-snapshot-9~svn355786/include/llvm/DebugInfo/DIContext.h:209:27: note: candidate: virtual llvm::DILineInfoTable llvm::DIContext::getLineInfoForAddressRange(llvm::object::SectionedAddress, uint64_t, llvm::DILineInfoSpecifier) virtual DILineInfoTable getLineInfoForAddressRange( ^~~~~~~~~~~~~~~~~~~~~~~~~~ /build/llvm-toolchain-snapshot-9~svn355786/include/llvm/DebugInfo/DIContext.h:209:27: note: no known conversion for argument 1 from 'uint64_t {aka long unsigned int}' to 'llvm::object::SectionedAddress'
Comment Actions
Oh I missed perf jit case, excuse me...
Could you set SectionIndex also, please ? The same way how it is done in https://reviews.llvm.org/D58959 :
uint64_t SectionIndex = object::SectionedAddress::UndefSection; if (auto SectOrErr = Sym.getSection()) if (*SectOrErr != Obj.section_end()) SectionIndex = SectOrErr.get()->getIndex(); DILineInfoTable Lines = Context->getLineInfoForAddressRange( {*AddrOrErr, SectionIndex}, Size, FileLineInfoKind::AbsoluteFilePath);
Comment Actions
This looks OK for me(taking into account the comment). Let final approve would be done by David, since He reviewed original patch.
David, Is it OK for you ?
lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp | ||
---|---|---|
270 | above two lines are not necessary. |
Comment Actions
Friendly ping, @sylvestre.ledru! I'm also experiencing this build error. It looks like other diffs have been submitted to fix this, such as https://reviews.llvm.org/D59162, but it was abandoned in favor of this patch. It'd be great if you could commit this one.
above two lines are not necessary.