diff --git a/src/core/wrapper.hpp b/src/core/wrapper.hpp index 059de901..a3fca40b 100644 --- a/src/core/wrapper.hpp +++ b/src/core/wrapper.hpp @@ -19,6 +19,7 @@ #ifndef CORE_WRAPPER_HPP_ #define CORE_WRAPPER_HPP_ + #include "pin.H" #include @@ -366,7 +367,7 @@ class WrapperFactory { WrapperMap::iterator it = wrappers_.find(name); if (it == wrappers_.end()) return NULL; - return dynamic_cast(it->second); + return reinterpret_cast(it->second); } static WrapperFactory *GetInstance() { diff --git a/src/systematic/controller.cpp b/src/systematic/controller.cpp index 94dfb984..8fbf88d0 100644 --- a/src/systematic/controller.cpp +++ b/src/systematic/controller.cpp @@ -959,13 +959,13 @@ Controller::BarrierInfo *Controller::GetBarrierInfo(address_t iaddr) { Object *Controller::GetObject(address_t iaddr) { Region *region = FindRegion(iaddr); DEBUG_ASSERT(region); - SRegion *sregion = dynamic_cast(region); + SRegion *sregion = reinterpret_cast(region); if (sregion) { Image *image = sregion->image; address_t offset = iaddr - sregion->addr; return program_->GetSObject(image, offset); } - DRegion *dregion = dynamic_cast(region); + DRegion *dregion = reinterpret_cast(region); if (dregion) { Thread *creator = dregion->creator; Inst *creator_inst = dregion->creator_inst; @@ -1033,7 +1033,7 @@ void Controller::FreeSRegion(address_t addr) { // delete a static region Region::Map::iterator it = region_table_.find(addr); if (it != region_table_.end()) { - SRegion *region = dynamic_cast(it->second); + SRegion *region = reinterpret_cast(it->second); DEBUG_ASSERT(region); region_table_.erase(it); FreeMutexInfo(region); @@ -1046,7 +1046,7 @@ void Controller::FreeDRegion(address_t addr) { // delete a dynamic region Region::Map::iterator it = region_table_.find(addr); if (it != region_table_.end()) { - DRegion *region = dynamic_cast(it->second); + DRegion *region = reinterpret_cast(it->second); DEBUG_ASSERT(region); region_table_.erase(it); FreeMutexInfo(region);