Hello all, I noticed Eliminating the 'void' type<http://nondot.org/sabre/LLVMNotes/EliminatingVoid.txt>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 {}? Thanks Mitnick -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120422/8f6197f7/attachment.html>
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>
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 {}? Mitnick -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120422/c58b82dd/attachment.html>