Improve compatibility with VC2005, patch by Morten Ofstad!

llvm-svn: 25653
This commit is contained in:
Chris Lattner 2006-01-26 19:55:20 +00:00
parent 4558e4ae10
commit ebbfb386a5
1 changed files with 5 additions and 3 deletions

View File

@ -20,6 +20,11 @@
#include <iostream>
using namespace llvm;
#ifdef _MSC_VER
extern "C" void *_AddressOfReturnAddress(void);
#pragma intrinsic(_AddressOfReturnAddress)
#endif
void X86JITInfo::replaceMachineCodeForFunction(void *Old, void *New) {
unsigned char *OldByte = (unsigned char *)Old;
*OldByte++ = 0xE9; // Emit JMP opcode.
@ -64,9 +69,6 @@ extern "C" {
"popl %ebp\n"
"ret\n");
#else
extern "C" void *_AddressOfReturnAddress(void);
#pragma intrinsic(_AddressOfReturnAddress)
void X86CompilationCallback2(void);
_declspec(naked) void X86CompilationCallback(void) {