summaryrefslogtreecommitdiff
path: root/tools/llvm-diff/DifferenceEngine.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-diff/DifferenceEngine.h')
-rw-r--r--tools/llvm-diff/DifferenceEngine.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/llvm-diff/DifferenceEngine.h b/tools/llvm-diff/DifferenceEngine.h
index bc33131734..1609bd5c10 100644
--- a/tools/llvm-diff/DifferenceEngine.h
+++ b/tools/llvm-diff/DifferenceEngine.h
@@ -79,8 +79,14 @@ namespace llvm {
void addMatch(Instruction *L, Instruction *R) {
Diff.push_back(DiffRecord(L, R));
}
- void addLeft(Instruction *L) { Diff.push_back(DiffRecord(L, 0)); }
- void addRight(Instruction *R) { Diff.push_back(DiffRecord(0, R)); }
+ void addLeft(Instruction *L) {
+ // HACK: VS 2010 has a bug in the stdlib that requires this.
+ Diff.push_back(DiffRecord(L, DiffRecord::second_type(0)));
+ }
+ void addRight(Instruction *R) {
+ // HACK: VS 2010 has a bug in the stdlib that requires this.
+ Diff.push_back(DiffRecord(DiffRecord::first_type(0), R));
+ }
unsigned getNumLines() const { return Diff.size(); }
DiffChange getLineKind(unsigned I) const {