checkpoint

This commit is contained in:
Evghenii
2013-10-29 13:36:31 +01:00
parent b2baa35c3d
commit ac700d4860
5 changed files with 85 additions and 3 deletions

View File

@@ -523,6 +523,11 @@ 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;
}
{
FunctionEmitContext ec(this, sym, function, firstStmtPos);
emitCode(&ec, function, firstStmtPos);
@@ -540,7 +545,7 @@ Function::GenerateIR() {
// the application can call it
const FunctionType *type = CastType<FunctionType>(sym->type);
Assert(type != NULL);
if (type->isExported) {
if (type->isExported && g->target->getISA() != Target::NVPTX64) {
if (!type->isTask) {
llvm::FunctionType *ftype = type->LLVMFunctionType(g->ctx, true);
llvm::GlobalValue::LinkageTypes linkage = llvm::GlobalValue::ExternalLinkage;