now adds function&module name. next step adding pointer to parameter list

This commit is contained in:
Evghenii
2013-10-30 22:41:01 +01:00
parent 8db3d25844
commit e7ddb9e642
2 changed files with 65 additions and 16 deletions

View File

@@ -523,19 +523,21 @@ Function::GenerateIR() {
}
// And we can now go ahead and emit the code
{ /* export function with NVPTX64 target should be emitted host architecture */
const FunctionType *type= CastType<FunctionType>(sym->type);
if (g->target->getISA() == Target::NVPTX64 && type->isExported)
return;
if (g->target->getISA() != Target::NVPTX64 && g->target->isPTX() && !type->isExported)
return;
}
/* export function with NVPTX64 target should be emitted host architecture */
const FunctionType *func_type= CastType<FunctionType>(sym->type);
if (g->target->getISA() == Target::NVPTX64 && func_type->isExported)
return;
if (g->target->getISA() != Target::NVPTX64 && g->target->isPTX() && !func_type->isExported)
return;
if (!(g->target->getISA() && func_type->isExported))
{
FunctionEmitContext ec(this, sym, function, firstStmtPos);
emitCode(&ec, function, firstStmtPos);
}
if (m->errorCount == 0) {
if (!(g->target->getISA() && func_type->isExported))
if (llvm::verifyFunction(*function, llvm::ReturnStatusAction) == true) {
if (g->debugPrint)
function->dump();