X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2FTableGen%2FAsmWriterEmitter.cpp;h=e2cd5dc031013edc3a7de5559e85f6cd00872606;hb=20072af3b0b22d90afbce769409f4ed822520366;hp=4ba22758a600e17658e2a60ab9f5677e945d8fc8;hpb=817affccd5aa96e3063c0611c319b0da63fb4d07;p=oota-llvm.git diff --git a/utils/TableGen/AsmWriterEmitter.cpp b/utils/TableGen/AsmWriterEmitter.cpp index 4ba22758a60..e2cd5dc0310 100644 --- a/utils/TableGen/AsmWriterEmitter.cpp +++ b/utils/TableGen/AsmWriterEmitter.cpp @@ -45,6 +45,9 @@ namespace llvm { /// an operand, specified with syntax like ${opname:modifier}. std::string MiModifier; + // To make VS STL happy + AsmWriterOperand():OperandType(isLiteralTextOperand) {} + AsmWriterOperand(const std::string &LitStr) : OperandType(isLiteralTextOperand), Str(LitStr) {} @@ -363,7 +366,7 @@ FindUniqueOperandCommands(std::vector &UniqueOperandCommands, for (unsigned i = 0, e = NumberedInstructions.size(); i != e; ++i) { const AsmWriterInst *Inst = getAsmWriterInstByID(i); - if (Inst == 0) continue; // PHI, INLINEASM, LABEL, etc. + if (Inst == 0) continue; // PHI, INLINEASM, DBG_LABEL, etc. std::string Command; if (Inst->Operands.empty()) @@ -536,7 +539,7 @@ void AsmWriterEmitter::run(std::ostream &O) { } // Figure out how many bits we used for the string index. - unsigned AsmStrBits = Log2_32_Ceil(MaxStringIdx); + unsigned AsmStrBits = Log2_32_Ceil(MaxStringIdx+1); // To reduce code size, we compactify common instructions into a few bits // in the opcode-indexed table. @@ -641,7 +644,7 @@ void AsmWriterEmitter::run(std::ostream &O) { << " O << \"\\t\";\n" << " printInlineAsm(MI);\n" << " return true;\n" - << " } else if (MI->getOpcode() == TargetInstrInfo::LABEL) {\n" + << " } else if (MI->isLabel()) {\n" << " printLabel(MI);\n" << " return true;\n" << " } else if (MI->getOpcode() == TargetInstrInfo::DECLARE) {\n"