diff options
author | Sylvestre Ledru <sylvestre@debian.org> | 2019-03-20 10:02:18 +0000 |
---|---|---|
committer | Sylvestre Ledru <sylvestre@debian.org> | 2019-03-20 10:02:18 +0000 |
commit | ba92e9bb1187a2c43ab727fb9685b65898a87a9d (patch) | |
tree | a8d9b5fceb2bf9402bdfde499b25a7cc6a945a39 /llvm/lib/ExecutionEngine | |
parent | 44a63f6a150dec72dea43730d2a89d292e58bd6f (diff) | |
download | bcm5719-llvm-ba92e9bb1187a2c43ab727fb9685b65898a87a9d.tar.gz bcm5719-llvm-ba92e9bb1187a2c43ab727fb9685b65898a87a9d.zip |
[perf][DebugInfo] follow up for "add SectionedAddress to DebugInfo interfaces"
Summary: Fix the build failure when perf jit is enabled
Reviewers: avl, dblaikie
Reviewed By: avl
Subscribers: modocache, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59189
llvm-svn: 356542
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r-- | llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp b/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp index 892a10782ae..67c3887cc49 100644 --- a/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp +++ b/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp @@ -265,16 +265,22 @@ void PerfJITEventListener::notifyObjectLoaded( consumeError(AddrOrErr.takeError()); continue; } - uint64_t Addr = *AddrOrErr; uint64_t Size = P.second; + object::SectionedAddress Address; + Address.Address = *AddrOrErr; + + uint64_t SectionIndex = object::SectionedAddress::UndefSection; + if (auto SectOrErr = Sym.getSection()) + if (*SectOrErr != Obj.section_end()) + SectionIndex = SectOrErr.get()->getIndex(); // According to spec debugging info has to come before loading the // corresonding code load. DILineInfoTable Lines = Context->getLineInfoForAddressRange( - Addr, Size, FileLineInfoKind::AbsoluteFilePath); + {*AddrOrErr, SectionIndex}, Size, FileLineInfoKind::AbsoluteFilePath); - NotifyDebug(Addr, Lines); - NotifyCode(Name, Addr, Size); + NotifyDebug(*AddrOrErr, Lines); + NotifyCode(Name, *AddrOrErr, Size); } Dumpstream->flush(); |