From 3d9b70c7a621aa1068bb2292c0f909220b33a40e Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Wed, 9 Oct 2013 19:28:09 +0200 Subject: [PATCH] Mention TypeInfo emission in debug log. --- gen/llvmhelpers.cpp | 3 +++ gen/typinf.cpp | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index 0fdd54af..0b055a82 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -1428,6 +1428,9 @@ LLConstant* DtoConstExpInit(Loc loc, Type* targetType, Expression* exp) LLConstant* DtoTypeInfoOf(Type* type, bool base) { + IF_LOG Logger::println("DtoTypeInfoOf(type = '%s', base='%d')", type->toChars(), base); + LOG_SCOPE + type = type->merge2(); // needed.. getTypeInfo does the same type->getTypeInfo(NULL); TypeInfoDeclaration* tidecl = type->vtinfo; diff --git a/gen/typinf.cpp b/gen/typinf.cpp index b59fffdb..5df51507 100644 --- a/gen/typinf.cpp +++ b/gen/typinf.cpp @@ -115,7 +115,9 @@ Expression *Type::getInternalTypeInfo(Scope *sc) Expression *Type::getTypeInfo(Scope *sc) { - //printf("Type::getTypeInfo() %p, %s\n", this, toChars()); + IF_LOG Logger::println("Type::getTypeInfo(): %s", toChars()); + LOG_SCOPE + if (!Type::typeinfo) { error(Loc(), "TypeInfo not found. object.d may be incorrectly installed or corrupt, compile with -v switch");