Skip to content

Commit

Permalink
Use a two-level cast through an intptr_t, and make them C-style casts.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
chandlerc committed Jun 11, 2016
1 parent 34033f1 commit b05edfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/include/llvm/Support/Registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b05edfc

Please sign in to comment.