From c813ccdcf71e44a115043dee92a9bde56a156293 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Sat, 15 Jun 2013 13:14:14 +0200 Subject: [PATCH] Small debug diagnostics improvements. --- gen/toir.cpp | 6 ++++-- ir/iraggr.cpp | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gen/toir.cpp b/gen/toir.cpp index fe8ae5d2..686bace7 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -1130,7 +1130,7 @@ LLConstant* CastExp::toConstElem(IRState* p) return res; Lerr: - error("can not cast %s to %s at compile time", e1->type->toChars(), type->toChars()); + error("cannot cast %s to %s at compile time", e1->type->toChars(), type->toChars()); if (!global.gag) fatal(); return NULL; @@ -1229,7 +1229,7 @@ llvm::Constant* SymOffExp::toConstElem(IRState* p) DValue* AddrExp::toElem(IRState* p) { - Logger::println("AddrExp::toElem: %s @ %s", toChars(), type->toChars()); + IF_LOG Logger::println("AddrExp::toElem: %s @ %s", toChars(), type->toChars()); LOG_SCOPE; DValue* v = e1->toElem(p); if (v->isField()) { @@ -1270,6 +1270,8 @@ DValue* AddrExp::toElem(IRState* p) LLConstant* AddrExp::toConstElem(IRState* p) { + IF_LOG Logger::println("AddrExp::toConstElem: %s @ %s", toChars(), type->toChars()); + LOG_SCOPE; // FIXME: this should probably be generalized more so we don't // need to have a case for each thing we can take the address of diff --git a/ir/iraggr.cpp b/ir/iraggr.cpp index e644663e..5e5acf23 100644 --- a/ir/iraggr.cpp +++ b/ir/iraggr.cpp @@ -245,6 +245,7 @@ llvm::Constant* IrAggr::createInitializerConstant( llvm::StructType* initializerType) { IF_LOG Logger::println("Creating initializer constant for %s", aggrdecl->toChars()); + LOG_SCOPE; llvm::SmallVector constants;