X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2FTableGen%2FCodeGenTarget.cpp;h=36a9d1ef923190ee50b2fe82c2ae8217ab1a75b8;hb=01dcecc214918b29cf3712420457fef309eeaad6;hp=0dbc70cf90a493cef0475ece7d7fa723786ed506;hpb=a28bc686fa4f2375237aeab58530126462ae9b41;p=oota-llvm.git diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp index 0dbc70cf90a..36a9d1ef923 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)->Namespace; + InstNS = i->second.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() const { +void CodeGenTarget::ComputeInstrsByEnum() { const std::map &Insts = getInstructions(); const CodeGenInstruction *PHI = GetInstByName("PHI", Insts); const CodeGenInstruction *INLINEASM = GetInstByName("INLINEASM", Insts); @@ -333,19 +333,19 @@ void CodeGenTarget::ComputeInstrsByEnum() const { 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 != 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); + 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); }