summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mca/CodeRegion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-mca/CodeRegion.cpp')
-rw-r--r--llvm/tools/llvm-mca/CodeRegion.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm-mca/CodeRegion.cpp b/llvm/tools/llvm-mca/CodeRegion.cpp
index 89686599650..c26658a6cf5 100644
--- a/llvm/tools/llvm-mca/CodeRegion.cpp
+++ b/llvm/tools/llvm-mca/CodeRegion.cpp
@@ -52,15 +52,15 @@ void CodeRegions::endRegion(SMLoc Loc) {
CurrentRegion.setEndLocation(Loc);
}
-void CodeRegions::addInstruction(std::unique_ptr<const MCInst> Instruction) {
- const SMLoc &Loc = Instruction->getLoc();
+void CodeRegions::addInstruction(const MCInst &Instruction) {
+ const SMLoc &Loc = Instruction.getLoc();
const auto It =
std::find_if(Regions.rbegin(), Regions.rend(),
[Loc](const std::unique_ptr<CodeRegion> &Region) {
return Region->isLocInRange(Loc);
});
if (It != Regions.rend())
- (*It)->addInstruction(std::move(Instruction));
+ (*It)->addInstruction(Instruction);
}
} // namespace mca
OpenPOWER on IntegriCloud