Fix -oq, closes #96

Add value debug output to RealExp::toConstElem.
This commit is contained in:
Christian Kamm
2008-10-03 19:24:46 +02:00
parent 2f9b9dead7
commit f4da5f4a89
2 changed files with 12 additions and 6 deletions

View File

@@ -141,16 +141,22 @@ File* Module::buildFilePath(char* forcename, char* path, char* ext)
argobj = FileName::name((char*)this->arg);
if (global.params.fqnNames)
{
if(md)
argobj = FileName::replaceName(argobj, md->toChars());
else
argobj = FileName::replaceName(argobj, toChars());
int clen = strlen(argobj);
char* tmp = (char *)alloca(clen + 1);
memcpy(tmp, argobj, clen);
tmp[clen] = 0;
argobj = tmp;
// add ext, otherwise forceExt will make nested.module into nested.bc
size_t len = strlen(argobj);
size_t extlen = strlen(ext);
char* s = (char *)alloca(len + 1 + extlen + 1);
memcpy(s, argobj, len);
s[len] = '.';
memcpy(s + len + 1, ext, extlen + 1);
s[len+1+extlen] = 0;
argobj = s;
}
}
if (!FileName::absolute(argobj))

View File

@@ -244,7 +244,7 @@ DValue* RealExp::toElem(IRState* p)
LLConstant* RealExp::toConstElem(IRState* p)
{
Logger::print("RealExp::toConstElem: %s | %s\n", toChars(), type->toChars());
Logger::print("RealExp::toConstElem: %s | %s | %LX\n", toChars(), type->toChars(), value);
LOG_SCOPE;
Type* t = type->toBasetype();
return DtoConstFP(t, value);