Skip to content

Commit

Permalink
formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Keno committed Jan 16, 2014
1 parent 0e90247 commit 018818c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
15 changes: 6 additions & 9 deletions src/cgutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
static GlobalVariable *prepare_global(GlobalVariable *G)
{
#ifdef USE_MCJIT
if(G->getParent() != jl_Module)
{
if(G->getParent() != jl_Module) {
GlobalVariable *gv = jl_Module->getGlobalVariable(G->getName());
if(!gv) {
gv =
Expand Down Expand Up @@ -125,20 +124,18 @@ class FunctionMover : public ValueMaterializer
else {
return destModule->getOrInsertFunction(F->getName(),F->getFunctionType());
}
} else if (!F->isDeclaration())
{
}
else if (!F->isDeclaration()) {
return clone_llvm_function(F,this);
}
}
// Still a declaration and still in a different module
if(F->isDeclaration() && F->getParent() != destModule)
{
if(F->isDeclaration() && F->getParent() != destModule) {
// Create forward declaration in current module
return destModule->getOrInsertFunction(F->getName(),F->getFunctionType());
}
} else if (isa<GlobalVariable>(V))
{

}
else if (isa<GlobalVariable>(V)) {
GlobalVariable *GV = cast<GlobalVariable>(V);
assert(GV != NULL);
GlobalVariable *newGV = new GlobalVariable(*destModule,
Expand Down
3 changes: 2 additions & 1 deletion src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2999,7 +2999,8 @@ static Function *emit_function(jl_lambda_info_t *lam, bool cstyle)
if(!imaging_mode) {
m = new Module(funcName.str(), jl_LLVMContext);
jl_ExecutionEngine->addModule(m);
} else {
}
else {
m = shadow_module;
}
#else
Expand Down

0 comments on commit 018818c

Please sign in to comment.