mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-09 00:13:14 +01:00
global.params.useAvailableExternally -> global.inExtraInliningSemantic.
This will hopefully make the associated code a bit easier to read.
This commit is contained in:
@@ -1881,7 +1881,7 @@ void VarDeclaration::setFieldOffset(AggregateDeclaration *ad, unsigned *poffset,
|
||||
void VarDeclaration::semantic3(Scope *sc)
|
||||
{
|
||||
// LDC
|
||||
if (!global.params.useAvailableExternally)
|
||||
if (!global.inExtraInliningSemantic)
|
||||
availableExternally = false;
|
||||
|
||||
if (aliassym)
|
||||
@@ -2355,7 +2355,7 @@ void TypeInfoDeclaration::semantic(Scope *sc)
|
||||
{
|
||||
assert(linkage == LINKc);
|
||||
#if IN_LLVM
|
||||
if (!global.params.useAvailableExternally)
|
||||
if (!global.inExtraInliningSemantic)
|
||||
availableExternally = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -938,7 +938,7 @@ void FuncDeclaration::semantic3(Scope *sc)
|
||||
semantic3Errors = 0;
|
||||
|
||||
#if IN_LLVM
|
||||
if (!global.params.useAvailableExternally)
|
||||
if (!global.inExtraInliningSemantic)
|
||||
availableExternally = false;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -294,7 +294,6 @@ struct Param
|
||||
OUTPUTFLAG output_o;
|
||||
bool useInlineAsm;
|
||||
bool verbose_cg;
|
||||
bool useAvailableExternally;
|
||||
|
||||
// target stuff
|
||||
llvm::Triple targetTriple;
|
||||
@@ -338,6 +337,8 @@ struct Global
|
||||
#if IN_LLVM
|
||||
char *ldc_version;
|
||||
char *llvm_version;
|
||||
|
||||
bool inExtraInliningSemantic;
|
||||
#endif
|
||||
|
||||
Param params;
|
||||
|
||||
@@ -101,7 +101,7 @@ void AggregateDeclaration::semantic2(Scope *sc)
|
||||
void AggregateDeclaration::semantic3(Scope *sc)
|
||||
{
|
||||
#if IN_LLVM
|
||||
if (!global.params.useAvailableExternally)
|
||||
if (!global.inExtraInliningSemantic)
|
||||
availableExternally = false;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1009,7 +1009,7 @@ int main(int argc, char** argv)
|
||||
// inlining is unlikely to be important for test builds anyway.
|
||||
if (!global.params.symdebug && willInline() && !global.params.useUnitTests)
|
||||
{
|
||||
global.params.useAvailableExternally = true;
|
||||
global.inExtraInliningSemantic = true;
|
||||
Logger::println("Running some extra semantic3's for inlining purposes");
|
||||
{
|
||||
// Do pass 3 semantic analysis on all imported modules,
|
||||
|
||||
@@ -1606,7 +1606,7 @@ bool mustDefineSymbol(Dsymbol* s)
|
||||
if (fd->isArrayOp == 1)
|
||||
return true;
|
||||
|
||||
if (global.params.useAvailableExternally && fd->availableExternally) {
|
||||
if (global.inExtraInliningSemantic && fd->availableExternally) {
|
||||
// Emit extra functions if we're inlining.
|
||||
// These will get available_externally linkage,
|
||||
// so they shouldn't end up in object code.
|
||||
@@ -1637,7 +1637,7 @@ bool mustDefineSymbol(Dsymbol* s)
|
||||
|
||||
// Inlining checks may create some variable and class declarations
|
||||
// we don't need to emit.
|
||||
if (global.params.useAvailableExternally)
|
||||
if (global.inExtraInliningSemantic)
|
||||
{
|
||||
if (VarDeclaration* vd = s->isVarDeclaration())
|
||||
if (vd->availableExternally)
|
||||
|
||||
Reference in New Issue
Block a user