summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2014-08-12 01:07:53 +0000
committerAdrian Prantl <aprantl@apple.com>2014-08-12 01:07:53 +0000
commit9724b5c9a45326a51d730bc6449230f5545ef56a (patch)
treed94243ff463f6bd0ef01d9c0b72a0753bc3ac72b /llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
parent90e0867742ae00e66a337234ca2ec087cdb6958f (diff)
downloadbcm5719-llvm-9724b5c9a45326a51d730bc6449230f5545ef56a.tar.gz
bcm5719-llvm-9724b5c9a45326a51d730bc6449230f5545ef56a.zip
DebugLocEntry: Restore the comparison predicate from before the
refactoring in 215384. This way it can unique multiple entries describing the same piece even if they don't have the exact same location. (The same piece may get merged in and be added from OpenRanges). There ought to be a more elegant solution for this, though. llvm-svn: 215418
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h b/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
index a4e37e13841..c1c3a62cf89 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
@@ -131,7 +131,10 @@ public:
// Remove any duplicate entries by dropping all but the first.
void sortUniqueValues() {
std::sort(Values.begin(), Values.end());
- Values.erase(std::unique(Values.begin(), Values.end()), Values.end());
+ Values.erase(std::unique(Values.begin(), Values.end(),
+ [](const Value &A, const Value &B) {
+ return A.getVariable() == B.getVariable();
+ }), Values.end());
}
};
OpenPOWER on IntegriCloud