Mercurial > projects > ldc
comparison dmd/struct.c @ 1482:d9c5f5a43403
Run `semantic3` on imported modules, and emit new symbols with
`available_externally` linkage. This allows the inliner to inline functions from
other modules while telling the code generator to ignore those functions (treat
them as declarations)
Still generates a few extra `TypeInfo`s and strings...
Disabled when generating debug info because I don't really understand it, and it
doesn't like this.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sun, 07 Jun 2009 16:00:13 +0200 |
parents | 8026319762be |
children | def7a1d494fd |
comparison
equal
deleted
inserted
replaced
1481:e0f03e11cdf8 | 1482:d9c5f5a43403 |
---|---|
50 dtor = NULL; | 50 dtor = NULL; |
51 | 51 |
52 ctor = NULL; | 52 ctor = NULL; |
53 defaultCtor = NULL; | 53 defaultCtor = NULL; |
54 #endif | 54 #endif |
55 | |
56 #if IN_LLVM | |
57 availableExternally = true; // assume this unless proven otherwise | |
58 #endif | |
55 } | 59 } |
56 | 60 |
57 enum PROT AggregateDeclaration::prot() | 61 enum PROT AggregateDeclaration::prot() |
58 { | 62 { |
59 return protection; | 63 return protection; |
78 } | 82 } |
79 } | 83 } |
80 | 84 |
81 void AggregateDeclaration::semantic3(Scope *sc) | 85 void AggregateDeclaration::semantic3(Scope *sc) |
82 { int i; | 86 { int i; |
87 | |
88 // LDC | |
89 if (!global.params.useAvailableExternally) | |
90 availableExternally = false; | |
83 | 91 |
84 //printf("AggregateDeclaration::semantic3(%s)\n", toChars()); | 92 //printf("AggregateDeclaration::semantic3(%s)\n", toChars()); |
85 if (members) | 93 if (members) |
86 { | 94 { |
87 sc = sc->push(this); | 95 sc = sc->push(this); |