mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 08:33: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:
@@ -29,7 +29,9 @@ LLConstant* DtoConstStructInitializer(StructInitializer* si)
|
||||
DtoResolveDsymbol(si->ad);
|
||||
|
||||
const llvm::StructType* structtype = isaStruct(ts->ir.type->get());
|
||||
Logger::cout() << "llvm struct type: " << *structtype << '\n';
|
||||
|
||||
if (Logger::enabled())
|
||||
Logger::cout() << "llvm struct type: " << *structtype << '\n';
|
||||
|
||||
assert(si->value.dim == si->vars.dim);
|
||||
|
||||
@@ -61,8 +63,11 @@ LLValue* DtoIndexStruct(LLValue* ptr, StructDeclaration* sd, Type* t, unsigned o
|
||||
const LLType* llt = getPtrToType(DtoType(t));
|
||||
const LLType* st = getPtrToType(DtoType(sd->type));
|
||||
|
||||
Logger::cout() << "ptr = " << *ptr << '\n';
|
||||
Logger::cout() << "st = " << *st << '\n';
|
||||
if (Logger::enabled())
|
||||
{
|
||||
Logger::cout() << "ptr = " << *ptr << '\n';
|
||||
Logger::cout() << "st = " << *st << '\n';
|
||||
}
|
||||
|
||||
if (ptr->getType() != st) {
|
||||
assert(sd->ir.irStruct->hasUnions);
|
||||
|
||||
Reference in New Issue
Block a user