diff --git a/llvm/include/llvm/Support/Registry.h b/llvm/include/llvm/Support/Registry.h index 45ba77000d8c4..27f025fcd080b 100644 --- a/llvm/include/llvm/Support/Registry.h +++ b/llvm/include/llvm/Support/Registry.h @@ -128,7 +128,7 @@ namespace llvm { std::string Name("LLVMGetRegistry_"); Name.append(RegistryName); GetRegistry Getter = - reinterpret_cast(DL.getAddressOfSymbol(Name.c_str())); + (GetRegistry)(intptr_t)DL.getAddressOfSymbol(Name.c_str()); if (Getter) { // Call the getter function in order to get the full copy of the // registry defined in the plugin DLL, and copy them over to the