summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/FastISelEmitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/TableGen/FastISelEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/FastISelEmitter.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/utils/TableGen/FastISelEmitter.cpp b/llvm/utils/TableGen/FastISelEmitter.cpp
index 399894f78d6..f01de1dcfce 100644
--- a/llvm/utils/TableGen/FastISelEmitter.cpp
+++ b/llvm/utils/TableGen/FastISelEmitter.cpp
@@ -381,14 +381,10 @@ void FastISelMap::CollectPatterns(CodeGenDAGPatterns &CGP) {
SubRegNo,
PhysRegInputs
};
- // FIXME: Source location information for the diagnostic.
if (SimplePatterns[Operands][OpcodeName][VT][RetVT]
- .count(PredicateCheck)) {
- SmallString<128> PatText;
- raw_svector_ostream OS(PatText);
- Pattern.SrcPattern->print(OS);
- throw "Duplicate record: " + OS.str().str();
- }
+ .count(PredicateCheck))
+ throw TGError(Pattern.getSrcRecord()->getLoc(), "Duplicate record!");
+
SimplePatterns[Operands][OpcodeName][VT][RetVT][PredicateCheck] = Memo;
}
}
OpenPOWER on IntegriCloud