Mercurial > projects > ldc
view test/classinfo1.d @ 102:027b8d8b71ec trunk
[svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
Basically it tries to do the following in order: Resolve types, Declare symbols, Create constant initializers, Apply initializers, Generate functions bodies.
ClassInfo is now has the most useful(biased?) members working.
Probably other stuf...
author | lindquist |
---|---|
date | Sun, 18 Nov 2007 06:52:57 +0100 |
parents | 5071469303d4 |
children | 368547b1cbe6 |
line wrap: on
line source
module classinfo1; class NoPtrs { } class HasPtrs { void* p; } void main() { { ClassInfo ci = NoPtrs.classinfo; char[] name = ci.name; printf("%.*s\n", name.length, name.ptr); assert(ci.name == "classinfo1.NoPtrs"); assert(ci.flags == 2); } { ClassInfo ci = HasPtrs.classinfo; char[] name = ci.name; printf("%.*s\n", name.length, name.ptr); assert(ci.name == "classinfo1.HasPtrs"); assert(ci.flags == 0); } }