summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-06-01 17:12:14 +0000
committerChris Lattner <sabre@nondot.org>2006-06-01 17:12:14 +0000
commitdcd73534df6697a602fe4c1d2ee326ecb36b716d (patch)
tree4c270ea9b0a7ea862aa22d0feee1d309051acc6a /llvm/lib/ExecutionEngine
parenta16b986df5b5826e3dafb48e1f601cf6a6e191b2 (diff)
downloadbcm5719-llvm-dcd73534df6697a602fe4c1d2ee326ecb36b716d.tar.gz
bcm5719-llvm-dcd73534df6697a602fe4c1d2ee326ecb36b716d.zip
Silence some -pedantic warnings.
llvm-svn: 28629
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/JIT/Intercept.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/Intercept.cpp b/llvm/lib/ExecutionEngine/JIT/Intercept.cpp
index 105514df3d0..490861d66c4 100644
--- a/llvm/lib/ExecutionEngine/JIT/Intercept.cpp
+++ b/llvm/lib/ExecutionEngine/JIT/Intercept.cpp
@@ -90,13 +90,15 @@ static int jit_atexit(void (*Fn)(void)) {
/// for resolving library symbols, not code generated symbols.
///
void *JIT::getPointerToNamedFunction(const std::string &Name) {
- // Check to see if this is one of the functions we want to intercept...
- if (Name == "exit") return (void*)&jit_exit;
- if (Name == "atexit") return (void*)&jit_atexit;
+ // Check to see if this is one of the functions we want to intercept. Note,
+ // we cast to intptr_t here to silence a -pedantic warning that complains
+ // about casting a function pointer to a normal pointer.
+ if (Name == "exit") return (void*)(intptr_t)&jit_exit;
+ if (Name == "atexit") return (void*)(intptr_t)&jit_atexit;
// If the program does not have a linked in __main function, allow it to run,
// but print a warning.
- if (Name == "__main") return (void*)&__mainFunc;
+ if (Name == "__main") return (void*)(intptr_t)&__mainFunc;
// If it's an external function, look it up in the process image...
void *Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(Name);
OpenPOWER on IntegriCloud