[llvm-commits] [llvm] r78838 - in /llvm/trunk: lib/CodeGen/AsmPrinter/AsmPrinter.cpp test/CodeGen/X86/loop-hoist.ll

Chris Lattner clattner at apple.com
Wed Aug 12 15:13:26 PDT 2009


On Aug 12, 2009, at 1:56 PM, Dan Gohman wrote:

> Author: djg
> Date: Wed Aug 12 15:56:56 2009
> New Revision: 78838
>
> URL: http://llvm.org/viewvc/llvm-project?rev=78838&view=rev
> Log:
> Use WriteAsOperand to print BasicBlock names.

Nice, this fixes a bug that would happen if the bb name had a \n in  
it. :)

-Chris

>
> Modified:
>    llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
>    llvm/trunk/test/CodeGen/X86/loop-hoist.ll
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=78838&r1=78837&r2=78838&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Wed Aug 12  
> 15:56:56 2009
> @@ -1639,8 +1639,8 @@
>     if (const BasicBlock *BB = MBB->getBasicBlock())
>       if (BB->hasName()) {
>         O.PadToColumn(TAI->getCommentColumn(), 1);
> -        O << TAI->getCommentString() << ' '
> -          << MBB->getBasicBlock()->getName();
> +        O << TAI->getCommentString() << ' ';
> +        WriteAsOperand(O, BB, /*PrintType=*/false);
>       }
>
>     if (printColon)
>
> Modified: llvm/trunk/test/CodeGen/X86/loop-hoist.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/loop-hoist.ll?rev=78838&r1=78837&r2=78838&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/test/CodeGen/X86/loop-hoist.ll (original)
> +++ llvm/trunk/test/CodeGen/X86/loop-hoist.ll Wed Aug 12 15:56:56 2009
> @@ -4,7 +4,7 @@
>
> ; CHECK: _foo:
> ; CHECK:    L_Arr$non_lazy_ptr
> -; CHECK: LBB1_1:	## cond_true
> +; CHECK: LBB1_1:	## %cond_true
>
> @Arr = external global [0 x i32]		; <[0 x i32]*> [#uses=1]
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list