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 | a2e1d007074371eafa608d7f8a65c9c6b2e446c9 (patch) | |
tree | b55e839013f78c735fb43f2466325ed348200309 /utils/TableGen/InstrInfoEmitter.cpp | |
parent | 5a406761ee3d8228218c4cd0189070f93bb3afa1 (diff) | |
download | external_llvm-a2e1d007074371eafa608d7f8a65c9c6b2e446c9.zip external_llvm-a2e1d007074371eafa608d7f8a65c9c6b2e446c9.tar.gz external_llvm-a2e1d007074371eafa608d7f8a65c9c6b2e446c9.tar.bz2 |
change Target.getInstructionsByEnumValue to return a reference
to a vector that CGT stores instead of synthesizing it on every
call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98910 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/InstrInfoEmitter.cpp')
-rw-r--r-- | utils/TableGen/InstrInfoEmitter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/TableGen/InstrInfoEmitter.cpp b/utils/TableGen/InstrInfoEmitter.cpp index 898c92a..83602bb 100644 --- a/utils/TableGen/InstrInfoEmitter.cpp +++ b/utils/TableGen/InstrInfoEmitter.cpp @@ -244,8 +244,8 @@ void InstrInfoEmitter::run(raw_ostream &OS) { // OS << "\nstatic const TargetInstrDesc " << TargetName << "Insts[] = {\n"; - std::vector<const CodeGenInstruction*> NumberedInstructions; - Target.getInstructionsByEnumValue(NumberedInstructions); + const std::vector<const CodeGenInstruction*> &NumberedInstructions = + Target.getInstructionsByEnumValue(); for (unsigned i = 0, e = NumberedInstructions.size(); i != e; ++i) emitRecord(*NumberedInstructions[i], i, InstrInfo, EmittedLists, |