diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-19 00:34:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-19 00:34:35 +0000 |
commit | 918be520dc4da4ffbcf02c858adc243293dbdc29 (patch) | |
tree | 303f83eac68eb6742ac1448a90972dc8315b830d /llvm/utils/TableGen/AsmWriterEmitter.cpp | |
parent | 1734e47d200fc75e5d044771441470ac0174609e (diff) | |
download | bcm5719-llvm-918be520dc4da4ffbcf02c858adc243293dbdc29.tar.gz bcm5719-llvm-918be520dc4da4ffbcf02c858adc243293dbdc29.zip |
change Target.getInstructionsByEnumValue to return a reference
to a vector that CGT stores instead of synthesizing it on every
call.
llvm-svn: 98910
Diffstat (limited to 'llvm/utils/TableGen/AsmWriterEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/AsmWriterEmitter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/AsmWriterEmitter.cpp b/llvm/utils/TableGen/AsmWriterEmitter.cpp index 3a38dd450ee..9378343cec7 100644 --- a/llvm/utils/TableGen/AsmWriterEmitter.cpp +++ b/llvm/utils/TableGen/AsmWriterEmitter.cpp @@ -263,7 +263,7 @@ void AsmWriterEmitter::EmitPrintInstruction(raw_ostream &O) { AsmWriter->getValueAsInt("OperandSpacing"))); // Get the instruction numbering. - Target.getInstructionsByEnumValue(NumberedInstructions); + NumberedInstructions = Target.getInstructionsByEnumValue(); // Compute the CodeGenInstruction -> AsmWriterInst mapping. Note that not // all machine instructions are necessarily being printed, so there may be @@ -499,8 +499,8 @@ void AsmWriterEmitter::EmitGetInstructionName(raw_ostream &O) { Record *AsmWriter = Target.getAsmWriter(); std::string ClassName = AsmWriter->getValueAsString("AsmWriterClassName"); - std::vector<const CodeGenInstruction*> NumberedInstructions; - Target.getInstructionsByEnumValue(NumberedInstructions); + const std::vector<const CodeGenInstruction*> &NumberedInstructions = + Target.getInstructionsByEnumValue(); StringToOffsetTable StringTable; O << |