From: Reid Kleckner Date: Thu, 30 Jun 2016 23:04:07 +0000 (+0000) Subject: [TableGen] Use a SmallVector for Record::Values to avoid debug iterators X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f0f4b69f42a4167ce4ea470dc1108ca256204b7;p=llvm [TableGen] Use a SmallVector for Record::Values to avoid debug iterators Debug iterators are valuable so we don't want to turn them off completely. However, llvm-tblgen is critical to build speed, so we can skip them here. Regenerating X86GenSubtargetInfo.inc in a clang-cl self-host debug build now takes 39s instead of 1m29s. Helps PR28222 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274288 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/TableGen/Record.h b/include/llvm/TableGen/Record.h index 9140b3a9c5e..43b1af086d2 100644 --- a/include/llvm/TableGen/Record.h +++ b/include/llvm/TableGen/Record.h @@ -1167,9 +1167,9 @@ class Record { // Location where record was instantiated, followed by the location of // multiclass prototypes used. SmallVector Locs; - std::vector TemplateArgs; - std::vector Values; - std::vector> SuperClasses; + SmallVector TemplateArgs; + SmallVector Values; + SmallVector, 0> SuperClasses; // Tracks Record instances. Not owned by Record. RecordKeeper &TrackedRecords;