annotate tests/mini/r.d @ 1650:40bd4a0d4870

Update to work with LLVM 2.7. Removed use of dyn_cast, llvm no compiles without exceptions and rtti by default. We do need exceptions for the libconfig stuff, but rtti isn't necessary (anymore). Debug info needs to be rewritten, as in LLVM 2.7 the format has completely changed. To have something to look at while rewriting, the old code has been wrapped inside #ifndef DISABLE_DEBUG_INFO , this means that you have to define this to compile at the moment. Updated tango 0.99.9 patch to include updated EH runtime code, which is needed for LLVM 2.7 as well.
author Tomas Lindquist Olsen
date Wed, 19 May 2010 12:42:32 +0200
parents 1bb99290e03a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
134
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
1 extern(C) int printf(char*, ...);
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
2
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
3 class C
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
4 {
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
5 void dump()
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
6 {
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
7 printf("C dumped\n");
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
8 }
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
9 }
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
10
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
11 void heap()
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
12 {
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
13 auto c = new C;
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
14 c.dump();
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
15 }
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
16
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
17 void stack()
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
18 {
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
19 scope c = new C;
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
20 c.dump();
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
21 }
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
22
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
23 void main()
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
24 {
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
25 heap();
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
26 stack();
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
27 }