global.params.useAvailableExternally -> global.inExtraInliningSemantic.

This will hopefully make the associated code a bit easier
to read.
This commit is contained in:
David Nadlinger
2013-04-01 21:17:13 +02:00
parent 5884f884ed
commit b8cdfad8c0
6 changed files with 9 additions and 8 deletions

View File

@@ -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
}

View File

@@ -938,7 +938,7 @@ void FuncDeclaration::semantic3(Scope *sc)
semantic3Errors = 0;
#if IN_LLVM
if (!global.params.useAvailableExternally)
if (!global.inExtraInliningSemantic)
availableExternally = false;
#endif

View File

@@ -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;

View File

@@ -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

View File

@@ -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,

View File

@@ -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)