mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-18 09:49:02 +02:00
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.
This commit is contained in:
@@ -300,6 +300,11 @@ struct VarDeclaration : Declaration
|
||||
/// Set during type generation.
|
||||
unsigned aggrIndex;
|
||||
|
||||
/// Variables that wouldn't have gotten semantic3'ed if we weren't inlining set this flag.
|
||||
bool availableExternally;
|
||||
/// Override added to set above flag.
|
||||
void semantic3(Scope *sc);
|
||||
|
||||
// FIXME: we're not using these anymore!
|
||||
AnonDeclaration* anonDecl;
|
||||
unsigned offset2;
|
||||
@@ -754,6 +759,9 @@ struct FuncDeclaration : Declaration
|
||||
// if this is an array operation it gets a little special attention
|
||||
bool isArrayOp;
|
||||
|
||||
// Functions that wouldn't have gotten semantic3'ed if we weren't inlining set this flag.
|
||||
bool availableExternally;
|
||||
|
||||
// true if overridden with the pragma(allow_inline); stmt
|
||||
bool allowInlining;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user