diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-19 00:40:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-19 00:40:22 +0000 |
commit | a28bc686fa4f2375237aeab58530126462ae9b41 (patch) | |
tree | acd88ad88d8d26421495bbcb3955d1bfd45ee02f /utils/TableGen/CodeGenTarget.cpp | |
parent | faa75f6e47350f491a44d5e8773acd9457185d51 (diff) |
make inst_begin/inst_end iterate over InstructionsByEnumValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98912 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenTarget.cpp')
-rw-r--r-- | utils/TableGen/CodeGenTarget.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp index 36a9d1ef92..0dbc70cf90 100644 --- a/utils/TableGen/CodeGenTarget.cpp +++ b/utils/TableGen/CodeGenTarget.cpp @@ -123,7 +123,7 @@ std::string CodeGenTarget::getInstNamespace() const { std::string InstNS; for (inst_iterator i = inst_begin(), e = inst_end(); i != e; ++i) { - InstNS = i->second.Namespace; + InstNS = (*i)->Namespace; // Make sure not to pick up "TargetInstrInfo" by accidentally getting // the namespace off the PHI instruction or something. @@ -300,7 +300,7 @@ GetInstByName(const char *Name, /// getInstructionsByEnumValue - Return all of the instructions defined by the /// target, ordered by their enum value. -void CodeGenTarget::ComputeInstrsByEnum() { +void CodeGenTarget::ComputeInstrsByEnum() const { const std::map<std::string, CodeGenInstruction> &Insts = getInstructions(); const CodeGenInstruction *PHI = GetInstByName("PHI", Insts); const CodeGenInstruction *INLINEASM = GetInstByName("INLINEASM", Insts); @@ -333,19 +333,19 @@ void CodeGenTarget::ComputeInstrsByEnum() { InstrsByEnum.push_back(COPY_TO_REGCLASS); InstrsByEnum.push_back(DBG_VALUE); for (inst_iterator II = inst_begin(), E = inst_end(); II != E; ++II) - if (&II->second != PHI && - &II->second != INLINEASM && - &II->second != DBG_LABEL && - &II->second != EH_LABEL && - &II->second != GC_LABEL && - &II->second != KILL && - &II->second != EXTRACT_SUBREG && - &II->second != INSERT_SUBREG && - &II->second != IMPLICIT_DEF && - &II->second != SUBREG_TO_REG && - &II->second != COPY_TO_REGCLASS && - &II->second != DBG_VALUE) - InstrsByEnum.push_back(&II->second); + if (*II != PHI && + *II != INLINEASM && + *II != DBG_LABEL && + *II != EH_LABEL && + *II != GC_LABEL && + *II != KILL && + *II != EXTRACT_SUBREG && + *II != INSERT_SUBREG && + *II != IMPLICIT_DEF && + *II != SUBREG_TO_REG && + *II != COPY_TO_REGCLASS && + *II != DBG_VALUE) + InstrsByEnum.push_back(*II); } |