summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRPrinter.cpp
diff options
context:
space:
mode:
authorDavid Stenberg <david.stenberg@ericsson.com>2019-08-19 12:41:22 +0000
committerDavid Stenberg <david.stenberg@ericsson.com>2019-08-19 12:41:22 +0000
commit88df53e6eaf355271e90fa928df53ab6ea244a69 (patch)
tree21cbe4e198bd8ce444d4a2353c5cafbe7e4a1257 /llvm/lib/CodeGen/MIRPrinter.cpp
parent0f9b5f86f1cd06c4a7fc9679d44f334796be653f (diff)
downloadbcm5719-llvm-88df53e6eaf355271e90fa928df53ab6ea244a69.tar.gz
bcm5719-llvm-88df53e6eaf355271e90fa928df53ab6ea244a69.zip
[DebugInfo] Allow bundled calls in the MIR's call site info
Summary: Extend the MIR parser and writer so that the call site information can refer to calls that are bundled. Reviewers: aprantl, asowda, NikolaPrica, djtodoro, ivanbaev, vsk Reviewed By: aprantl Subscribers: arsenm, hiraditya, llvm-commits Tags: #debug-info, #llvm Differential Revision: https://reviews.llvm.org/D66145 llvm-svn: 369256
Diffstat (limited to 'llvm/lib/CodeGen/MIRPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRPrinter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp
index 539aa863e22..7febb11dcb8 100644
--- a/llvm/lib/CodeGen/MIRPrinter.cpp
+++ b/llvm/lib/CodeGen/MIRPrinter.cpp
@@ -473,10 +473,11 @@ void MIRPrinter::convertCallSiteObjects(yaml::MachineFunction &YMF,
yaml::CallSiteInfo::MachineInstrLoc CallLocation;
// Prepare instruction position.
- MachineBasicBlock::const_iterator CallI = CSInfo.first->getIterator();
+ MachineBasicBlock::const_instr_iterator CallI = CSInfo.first->getIterator();
CallLocation.BlockNum = CallI->getParent()->getNumber();
// Get call instruction offset from the beginning of block.
- CallLocation.Offset = std::distance(CallI->getParent()->begin(), CallI);
+ CallLocation.Offset =
+ std::distance(CallI->getParent()->instr_begin(), CallI);
YmlCS.CallLocation = CallLocation;
// Construct call arguments and theirs forwarding register info.
for (auto ArgReg : CSInfo.second) {
OpenPOWER on IntegriCloud