Use a two-level cast through an intptr_t, and make them C-style casts.

This shouldn't have any functional difference, but it appears to be the
pattern used for other methods on DynamicLibrary, and it should avoid
the -Wpedantic warning on one of the build bots about the direct
reinterpret_cast.

llvm-svn: 272461
This commit is contained in:
Chandler Carruth 2016-06-11 08:19:59 +00:00
parent 34033f10de
commit b05edfc10d
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ namespace llvm {
std::string Name("LLVMGetRegistry_");
Name.append(RegistryName);
GetRegistry Getter =
reinterpret_cast<GetRegistry>(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