mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-14 20:03:14 +01:00
Wrapped all the most potentially expensive logging calls in a conditional to only do work when actually requested.
Commented some logging calls that could potentially write out many megabytes of type dumps.
This commit is contained in:
@@ -61,10 +61,10 @@ void Module::genobjfile(int multiobj)
|
||||
Logger::enable();
|
||||
}
|
||||
|
||||
Logger::cout() << "Generating module: " << (md ? md->toChars() : toChars()) << '\n';
|
||||
Logger::println("Generating module: %s\n", (md ? md->toChars() : toChars()));
|
||||
LOG_SCOPE;
|
||||
|
||||
//printf("codegen: %s\n", srcfile->toChars());
|
||||
printf("codegen: %s\n", srcfile->toChars());
|
||||
|
||||
// start by deleting the old object file
|
||||
deleteObjFile();
|
||||
@@ -652,7 +652,8 @@ void VarDeclaration::toObjFile(int multiobj)
|
||||
llvm::GlobalVariable* gvar = new llvm::GlobalVariable(_type,_isconst,_linkage,NULL,_name,gIR->module);
|
||||
this->ir.irGlobal->value = gvar;
|
||||
|
||||
Logger::cout() << *gvar << '\n';
|
||||
if (Logger::enabled())
|
||||
Logger::cout() << *gvar << '\n';
|
||||
|
||||
if (static_local)
|
||||
DtoConstInitGlobal(this);
|
||||
|
||||
Reference in New Issue
Block a user