aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/InstrInfoEmitter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-19 00:34:35 +0000
committerChris Lattner <sabre@nondot.org>2010-03-19 00:34:35 +0000
commita2e1d007074371eafa608d7f8a65c9c6b2e446c9 (patch)
treeb55e839013f78c735fb43f2466325ed348200309 /utils/TableGen/InstrInfoEmitter.cpp
parent5a406761ee3d8228218c4cd0189070f93bb3afa1 (diff)
downloadexternal_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.cpp4
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,