summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cfi-verify/lib/GraphBuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-cfi-verify/lib/GraphBuilder.cpp')
-rw-r--r--llvm/tools/llvm-cfi-verify/lib/GraphBuilder.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/tools/llvm-cfi-verify/lib/GraphBuilder.cpp b/llvm/tools/llvm-cfi-verify/lib/GraphBuilder.cpp
index 1f8fccb32ff..b621836b270 100644
--- a/llvm/tools/llvm-cfi-verify/lib/GraphBuilder.cpp
+++ b/llvm/tools/llvm-cfi-verify/lib/GraphBuilder.cpp
@@ -93,17 +93,19 @@ void GraphResult::printToDOT(const FileAnalysis &Analysis,
}
GraphResult GraphBuilder::buildFlowGraph(const FileAnalysis &Analysis,
- uint64_t Address) {
+ object::SectionedAddress Address) {
GraphResult Result;
- Result.BaseAddress = Address;
+ Result.BaseAddress = Address.Address;
DenseSet<uint64_t> OpenedNodes;
const auto &IndirectInstructions = Analysis.getIndirectInstructions();
- if (IndirectInstructions.find(Address) == IndirectInstructions.end())
+ // check that IndirectInstructions contains specified Address
+ if (IndirectInstructions.find(Address) == IndirectInstructions.end()) {
return Result;
+ }
- buildFlowGraphImpl(Analysis, OpenedNodes, Result, Address, 0);
+ buildFlowGraphImpl(Analysis, OpenedNodes, Result, Address.Address, 0);
return Result;
}
OpenPOWER on IntegriCloud