mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-10 01:14:09 +02:00
Committing LLVM binding for D as it currently exists in the SVN repository.
This commit is contained in:
18
tools/binding/llvmsample2.d
Normal file
18
tools/binding/llvmsample2.d
Normal file
@@ -0,0 +1,18 @@
|
||||
// simple test of recursive types.
|
||||
module llvmsample2;
|
||||
|
||||
import llvm.llvm;
|
||||
|
||||
void main()
|
||||
{
|
||||
auto th = new TypeHandle();
|
||||
auto s = StructType.Get([ PointerType.Get(th.resolve) ], false);
|
||||
th.refine(s);
|
||||
s.dump();
|
||||
th.dispose();
|
||||
|
||||
auto t = getTypeOf(s.ll);
|
||||
t.dump();
|
||||
|
||||
assert(s is t);
|
||||
}
|
||||
Reference in New Issue
Block a user