[LLVMdev] Eliminating the 'void' type

Chris Lattner clattner at apple.com
Sun Apr 22 11:41:13 PDT 2012


On Apr 22, 2012, at 3:44 AM, Lyu Mitnick wrote:

> Hello Chris,
> 
> The general concept is to replace void with {}.  Void is a weird type in that it is only allowed as the return value of functions and as the type of instructions like store.  It seems better (though also not particularly high priority) to eliminate it to make the type system more consistent.
> 
> -Chris
> 
> I also noticed a sentence "We can even make 'Type::VoidTy' be a pointer to '{}' " in notes. Is 
> this idea conflict with replace void with {}?


The wording is confusion, but I meant that the C++ value "VoidTy" (which doesn't even exist anymore) could be a C++ pointer to the IR type object for {}.  VoidTy itself would be {}.

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120422/24c6683d/attachment.html>


More information about the llvm-dev mailing list