File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 22
22
#include " Types.h"
23
23
#include " llvm/ADT/ArrayRef.h"
24
24
#include " llvm/ADT/STLExtras.h"
25
+ #include " llvm/ADT/SmallVector.h"
25
26
#include " llvm/ADT/StringExtras.h"
26
27
#include " llvm/Support/Casting.h"
27
28
#include " llvm/Support/raw_ostream.h"
@@ -474,15 +475,15 @@ void InstrInfoEmitter::emitOperandTypeMappings(
474
475
OS << " LLVM_READONLY\n " ;
475
476
OS << " static int getMemOperandSize(int OpType) {\n " ;
476
477
OS << " switch (OpType) {\n " ;
477
- std::map<int , std::vector <StringRef>> SizeToOperandName;
478
+ std::map<int , SmallVector <StringRef, 0 >> SizeToOperandName;
478
479
for (const Record *Op : Operands) {
479
480
if (!Op->isSubClassOf (" X86MemOperand" ))
480
481
continue ;
481
482
if (int Size = Op->getValueAsInt (" Size" ))
482
483
SizeToOperandName[Size].push_back (Op->getName ());
483
484
}
484
485
OS << " default: return 0;\n " ;
485
- for (auto KV : SizeToOperandName) {
486
+ for (const auto & KV : SizeToOperandName) {
486
487
for (const StringRef &OperandName : KV.second )
487
488
OS << " case OpTypes::" << OperandName << " :\n " ;
488
489
OS << " return " << KV.first << " ;\n\n " ;
You can’t perform that action at this time.
0 commit comments