From: Craig Topper Date: Tue, 13 Mar 2012 06:39:00 +0000 (+0000) Subject: Remove unused field from FixedLenDecoderEmitter. Move NumberedInstructions declaratio... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=c007ba86f31ebe3a1c4cdba5fa23260caaf81e0f;p=oota-llvm.git Remove unused field from FixedLenDecoderEmitter. Move NumberedInstructions declaration from class to run method since its only used there and was being reinitialized anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152616 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/FixedLenDecoderEmitter.cpp b/utils/TableGen/FixedLenDecoderEmitter.cpp index 19e86db41a7..524d7566b5e 100644 --- a/utils/TableGen/FixedLenDecoderEmitter.cpp +++ b/utils/TableGen/FixedLenDecoderEmitter.cpp @@ -1527,7 +1527,8 @@ void FixedLenDecoderEmitter::run(raw_ostream &o) o << "namespace llvm {\n\n"; // Parameterize the decoders based on namespace and instruction width. - NumberedInstructions = Target.getInstructionsByEnumValue(); + std::vector NumberedInstructions = + Target.getInstructionsByEnumValue(); std::map, std::vector > OpcMap; std::map > Operands; diff --git a/utils/TableGen/FixedLenDecoderEmitter.h b/utils/TableGen/FixedLenDecoderEmitter.h index 90e8d869ac0..1ba7dfdad96 100644 --- a/utils/TableGen/FixedLenDecoderEmitter.h +++ b/utils/TableGen/FixedLenDecoderEmitter.h @@ -57,8 +57,7 @@ public: std::string ROK = "MCDisassembler::Success", std::string RFail = "MCDisassembler::Fail", std::string L = "") : - Records(R), Target(R), - NumberedInstructions(Target.getInstructionsByEnumValue()), + Target(R), PredicateNamespace(PredicateNamespace), GuardPrefix(GPrefix), GuardPostfix(GPostfix), ReturnOK(ROK), ReturnFail(RFail), Locals(L) {} @@ -67,9 +66,7 @@ public: void run(raw_ostream &o); private: - RecordKeeper &Records; CodeGenTarget Target; - std::vector NumberedInstructions; public: std::string PredicateNamespace; std::string GuardPrefix, GuardPostfix;