}
void UltraSparc::replaceMachineCodeForFunction (void *Old, void *New) {
- if (!TheJITResolver) return true; // fail if not in JIT.
+ assert (TheJITResolver &&
+ "Can only call replaceMachineCodeForFunction from within JIT");
uint64_t Target = (uint64_t)(intptr_t)New;
uint64_t CodeBegin = (uint64_t)(intptr_t)Old;
TheJITResolver->insertJumpAtAddr(Target, CodeBegin);
virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
- virtual bool replaceMachineCodeForFunction (void *Old, void *New);
+ virtual void replaceMachineCodeForFunction (void *Old, void *New);
};
#endif