Better const handling for RuntimeDyld and MCJIT.
authorJim Grosbach <grosbach@apple.com>
Thu, 13 Sep 2012 21:50:06 +0000 (21:50 +0000)
committerJim Grosbach <grosbach@apple.com>
Thu, 13 Sep 2012 21:50:06 +0000 (21:50 +0000)
mapSectionAddress() wasn't consistent.

llvm-svn: 163843

llvm/include/llvm/ExecutionEngine/ExecutionEngine.h
llvm/include/llvm/ExecutionEngine/RuntimeDyld.h
llvm/lib/ExecutionEngine/MCJIT/MCJIT.h
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h

index ae8b68d0241ec3895b24d4cf54e295f5cd4b18b7..8fb93bf2f97dfa14724258ea33c80df8719cf1a4 100644 (file)
@@ -244,7 +244,7 @@ public:
   /// Map the address of a JIT section as returned from the memory manager
   /// to the address in the target process as the running code will see it.
   /// This is the address which will be used for relocation resolution.
-  virtual void mapSectionAddress(void *LocalAddress, uint64_t TargetAddress) {
+  virtual void mapSectionAddress(const void *LocalAddress, uint64_t TargetAddress) {
     llvm_unreachable("Re-mapping of section addresses not supported with this "
                      "EE!");
   }
index 9e5ad2feb0d6e4f53c84ee6c5d4ecbb8dfa1a39e..73d04fddd34c9efb5ed24ccbbe57659d0f5bc632 100644 (file)
@@ -84,7 +84,7 @@ public:
   /// Map the address of a JIT section as returned from the memory manager
   /// to the address in the target process as the running code will see it.
   /// This is the address which will be used for relocation resolution.
-  void mapSectionAddress(void *LocalAddress, uint64_t TargetAddress);
+  void mapSectionAddress(const void *LocalAddress, uint64_t TargetAddress);
 
   StringRef getErrorString();
 };
index 138a7b64b23f73b898132b0ee93e4dd968106333..d5c5d77574594d37bf452feba21c29f365949e35 100644 (file)
@@ -71,7 +71,8 @@ public:
   /// Map the address of a JIT section as returned from the memory manager
   /// to the address in the target process as the running code will see it.
   /// This is the address which will be used for relocation resolution.
-  virtual void mapSectionAddress(void *LocalAddress, uint64_t TargetAddress) {
+  virtual void mapSectionAddress(const void *LocalAddress,
+                                 uint64_t TargetAddress) {
     Dyld.mapSectionAddress(LocalAddress, TargetAddress);
   }
 
index d47287b8781c5a234d8b114db6b9bcb8c53e930b..d06a1fc98467c1f20f721594116c1092fd75b079 100644 (file)
@@ -48,7 +48,7 @@ void RuntimeDyldImpl::resolveRelocations() {
   }
 }
 
-void RuntimeDyldImpl::mapSectionAddress(void *LocalAddress,
+void RuntimeDyldImpl::mapSectionAddress(const void *LocalAddress,
                                         uint64_t TargetAddress) {
   for (unsigned i = 0, e = Sections.size(); i != e; ++i) {
     if (Sections[i].Address == LocalAddress) {
@@ -492,7 +492,7 @@ void RuntimeDyld::reassignSectionAddress(unsigned SectionID,
   Dyld->reassignSectionAddress(SectionID, Addr);
 }
 
-void RuntimeDyld::mapSectionAddress(void *LocalAddress,
+void RuntimeDyld::mapSectionAddress(const void *LocalAddress,
                                     uint64_t TargetAddress) {
   Dyld->mapSectionAddress(LocalAddress, TargetAddress);
 }
index d5df732b91c981dcba9e6647a6484e3f5cb5cbca..d56cab293ca4fc3075875ddc4a9f6e10a47b1c2c 100644 (file)
@@ -287,7 +287,7 @@ public:
 
   void reassignSectionAddress(unsigned SectionID, uint64_t Addr);
 
-  void mapSectionAddress(void *LocalAddress, uint64_t TargetAddress);
+  void mapSectionAddress(const void *LocalAddress, uint64_t TargetAddress);
 
   // Is the linker in an error state?
   bool hasError() { return HasError; }