[llvm-commits] [llvm] r75806 - in /llvm/trunk: include/llvm/CodeGen/AsmPrinter.h utils/TableGen/AsmWriterEmitter.cpp

David A. Greene greened at obbligato.org
Fri Jul 17 11:44:46 PDT 2009


On Friday 17 July 2009 12:26, Sanjiv Gupta wrote:
> >       // Do the post instruction processing and print the final newline
> > -      UniqueOperandCommands.push_back("    postInstructionAction(*MI);\n
> >    O << \"\\n\";\n    return true;\n"); +     
> > UniqueOperandCommands.push_back("    EmitComments(*MI);\n    O <<
> > \"\\n\";\n    return true;\n");
>
> This "return true" here is too early, it is missing the last fragment in
> case of MOVF_INSN in PIC16. I think this is broken since your commit
> 75490 itself.

Hmm.  The original code was:

29196    lattner     // For the first operand check, add a default value for 
instructions with
 29196    lattner     // just opcode strings to use.
 29183    lattner     if (isFirst) {
 29196    lattner       UniqueOperandCommands.push_back("    return true;\n");
 29183    lattner       isFirst = false;
 29183    lattner     }

The current code is:

 29196    lattner     // For the first operand check, add a default value for 
instructions with
 29196    lattner     // just opcode strings to use.
 29183    lattner     if (isFirst) {
 75490    greened       // Do the post instruction processing and print the 
final newline
 75806    greened       UniqueOperandCommands.push_back("    
EmitComments(*MI);\n    O << \"\\n\";\n    return true;\n");
 29183    lattner       isFirst = false;
 29183    lattner     }

So the "return true" was always there.  Is it possible this is a bug that's
been in AsmWriterEmitter.cpp for a long time?

                                -Dave



More information about the llvm-commits mailing list