summaryrefslogtreecommitdiff
path: root/lib/TableGen/TGParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/TableGen/TGParser.cpp')
-rw-r--r--lib/TableGen/TGParser.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp
index b9c7ff694d..5e2b66ed69 100644
--- a/lib/TableGen/TGParser.cpp
+++ b/lib/TableGen/TGParser.cpp
@@ -2277,7 +2277,10 @@ InstantiateMulticlassDef(MultiClass &MC,
DefName, StringRecTy::get())->Fold(DefProto, &MC);
}
- Record *CurRec = new Record(DefName, DefmPrefixLoc, Records);
+ // Make a trail of SMLocs from the multiclass instantiations.
+ SmallVector<SMLoc, 4> Locs(1, DefmPrefixLoc);
+ Locs.append(DefProto->getLoc().begin(), DefProto->getLoc().end());
+ Record *CurRec = new Record(DefName, Locs, Records);
SubClassReference Ref;
Ref.RefLoc = DefmPrefixLoc;