mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
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
This commit is contained in:
@@ -86,8 +86,8 @@ void CodeEmitterGen::run(raw_ostream &o) {
|
||||
EmitSourceFileHeader("Machine Code Emitter", o);
|
||||
std::string Namespace = Insts[0]->getValueAsString("Namespace") + "::";
|
||||
|
||||
std::vector<const CodeGenInstruction*> NumberedInstructions;
|
||||
Target.getInstructionsByEnumValue(NumberedInstructions);
|
||||
const std::vector<const CodeGenInstruction*> &NumberedInstructions =
|
||||
Target.getInstructionsByEnumValue();
|
||||
|
||||
// Emit function declaration
|
||||
o << "unsigned " << Target.getName() << "CodeEmitter::"
|
||||
@@ -95,7 +95,7 @@ void CodeEmitterGen::run(raw_ostream &o) {
|
||||
|
||||
// Emit instruction base values
|
||||
o << " static const unsigned InstBits[] = {\n";
|
||||
for (std::vector<const CodeGenInstruction*>::iterator
|
||||
for (std::vector<const CodeGenInstruction*>::const_iterator
|
||||
IN = NumberedInstructions.begin(),
|
||||
EN = NumberedInstructions.end();
|
||||
IN != EN; ++IN) {
|
||||
|
||||
Reference in New Issue
Block a user