emit a 'maybe ftCall' in relocatable modules, to support optimizing inner-module function pointer calls
diff --git a/lib/Target/JSBackend/CallHandlers.h b/lib/Target/JSBackend/CallHandlers.h index 343ab54..9fc1d27 100644 --- a/lib/Target/JSBackend/CallHandlers.h +++ b/lib/Target/JSBackend/CallHandlers.h
@@ -80,7 +80,7 @@ Name = std::string("FUNCTION_TABLE_") + Sig + "[" + Name + " & #FM_" + Sig + "#]"; NeedCasts = false; // function table call, so stays in asm module } else { - Name = std::string("ftCall_") + Sig + "(" + getCast(Name, Type::getInt32Ty(CI->getContext())); + Name = std::string(Relocatable ? "mftCall_" : "ftCall_") + Sig + "(" + getCast(Name, Type::getInt32Ty(CI->getContext())); if (NumArgs > 0) Name += ','; Emulated = true; }