[LLVMdev] Eliminating the 'void' type

Chris Lattner clattner at apple.com
Sat Apr 21 13:20:40 PDT 2012


On Apr 21, 2012, at 12:17 PM, Lyu Mitnick wrote:

> Hello all,
> 
> I noticed Eliminating the 'void' type in Random LLVM notes. I am wondering to know what's the 
> meaning of "eliminating" the void type. Is it means the goal is deleting VoidTyID from TypeID
> enumeration in Type.h? And what Type::getVoidTy() returned is a pointer to a {}?

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120421/250111a6/attachment.html>


More information about the llvm-dev mailing list