Small debug diagnostics improvements.

This commit is contained in:
David Nadlinger
2013-06-15 13:14:14 +02:00
parent 66e9427f88
commit c813ccdcf7
2 changed files with 5 additions and 2 deletions

View File

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

View File

@@ -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<llvm::Constant*, 16> constants;