[LLVMbugs] [Bug 4213] New: Cannot create call to void function using C++ API

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu May 14 19:25:12 PDT 2009


           Summary: Cannot create call to void function using C++ API
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: matthew at loar.name
                CC: llvmbugs at cs.uiuc.edu

When attempting to create a call to a function with a return type of
Type::VoidTy using the C++ API, I get the following assertion failure:

"molc: Value.cpp:182: void llvm::Value::setName(const char*, unsigned int):
Assertion `getType() != Type::VoidTy && "Cannot assign a name to void values!"'

This appears to be because the CallInst class ultimately is derived from Value.
 The type that is passed to the Value constructor is the return type of the
called function.  The CallInst constructor then calls setName(), triggering the

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list