aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-06-01 17:13:10 +0000
committerChris Lattner <sabre@nondot.org>2006-06-01 17:13:10 +0000
commit078d1826d2c516fa15d3ead55c84af39b2becea3 (patch)
treefbb0b9cedb1c98a8ce61191d9ed965e5c71e895a /lib
parentfea34a1f1137bfd68417158a91d2cd8b3e19abcb (diff)
downloadexternal_llvm-078d1826d2c516fa15d3ead55c84af39b2becea3.zip
external_llvm-078d1826d2c516fa15d3ead55c84af39b2becea3.tar.gz
external_llvm-078d1826d2c516fa15d3ead55c84af39b2becea3.tar.bz2
Silence -pedantic warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28630 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86JITInfo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/X86/X86JITInfo.cpp b/lib/Target/X86/X86JITInfo.cpp
index 6f83651..87fca43 100644
--- a/lib/Target/X86/X86JITInfo.cpp
+++ b/lib/Target/X86/X86JITInfo.cpp
@@ -167,7 +167,9 @@ X86JITInfo::getLazyResolverFunction(JITCompilerFn F) {
}
void *X86JITInfo::emitFunctionStub(void *Fn, MachineCodeEmitter &MCE) {
- if (Fn != (void*)X86CompilationCallback) {
+ // Note, we cast to intptr_t here to silence a -pedantic warning that
+ // complains about casting a function pointer to a normal pointer.
+ if (Fn != (void*)(intptr_t)X86CompilationCallback) {
MCE.startFunctionStub(5);
MCE.emitByte(0xE9);
MCE.emitWordLE((intptr_t)Fn-MCE.getCurrentPCValue()-4);