[LLVMbugs] [Bug 15873] New: IR Builder: Ability to insert comments

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Apr 30 12:59:54 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=15873

            Bug ID: 15873
           Summary: IR Builder: Ability to insert comments
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Bitcode Writer
          Assignee: unassignedbugs at nondot.org
          Reporter: superjoe30 at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

When writing a program that uses the IR Builder to generate IR code, it would
be extremely helpful to be able to insert comments so that when you look at
module.Dump() you can see some debug information.

For example, something like this:

LLVMBasicBlockRef entry = LLVMAppendBasicBlock(fac, "entry");
LLVMPrependComment(entry, "converted from such and such code");
...
LLVMValueRef If = LLVMBuildICmp(builder, LLVMIntEQ, n,
LLVMConstInt(LLVMInt32Type(), 0, 0), "n == 0");
LLVMPrependComment(If, "blah blah blah");

And when the module is dumped, looks something like this:

; converted from such and such code
entry:

...

; blah blah blah
%0 = icmp eq i32 0, 0

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130430/506a7be9/attachment.html>


More information about the llvm-bugs mailing list