mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-06 19:06:02 +03:00
Ensure all logging of llvm values/types is only called when -vv is passed
This commit is contained in:
parent
d522fef71f
commit
dcf3c96f65
2 changed files with 11 additions and 6 deletions
|
@ -247,6 +247,7 @@ void DtoResolveClass(ClassDeclaration* cd)
|
|||
llvm::cast<llvm::OpaqueType>(irstruct->vtblTy.get())->refineAbstractTypeTo(LLArrayType::get(getVoidPtrType(), cd->vtbl.dim));
|
||||
|
||||
// log
|
||||
if (Logger::enabled())
|
||||
Logger::cout() << "final class type: " << *ts->ir.type->get() << '\n';
|
||||
|
||||
// pop state
|
||||
|
|
|
@ -430,11 +430,14 @@ DValue* DtoCallFunction(Loc& loc, Type* resulttype, DValue* fnval, Expressions*
|
|||
}
|
||||
|
||||
#if 1
|
||||
if (Logger::enabled())
|
||||
{
|
||||
Logger::println("%lu params passed", args.size());
|
||||
for (int i=0; i<args.size(); ++i) {
|
||||
assert(args[i]);
|
||||
Logger::cout() << "arg["<<i<<"] = " << *args[i] << '\n';
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// void returns cannot not be named
|
||||
|
@ -442,6 +445,7 @@ DValue* DtoCallFunction(Loc& loc, Type* resulttype, DValue* fnval, Expressions*
|
|||
if (callableTy->getReturnType() != LLType::VoidTy)
|
||||
varname = "tmp";
|
||||
|
||||
if (Logger::enabled())
|
||||
Logger::cout() << "Calling: " << *callable << '\n';
|
||||
|
||||
// call the function
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue