Mercurial > projects > ldc
comparison tools/binding/llvmsample2.d @ 1273:1ba61de8796b
Committing LLVM binding for D as it currently exists in the SVN repository.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Mon, 27 Apr 2009 22:33:17 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1272:dd4766851b37 | 1273:1ba61de8796b |
---|---|
1 // simple test of recursive types. | |
2 module llvmsample2; | |
3 | |
4 import llvm.llvm; | |
5 | |
6 void main() | |
7 { | |
8 auto th = new TypeHandle(); | |
9 auto s = StructType.Get([ PointerType.Get(th.resolve) ], false); | |
10 th.refine(s); | |
11 s.dump(); | |
12 th.dispose(); | |
13 | |
14 auto t = getTypeOf(s.ll); | |
15 t.dump(); | |
16 | |
17 assert(s is t); | |
18 } |