Add back r201608, r201622, r201624 and r201625
[oota-llvm.git] / lib / ExecutionEngine / MCJIT / MCJIT.cpp
index 507dae2e517c20fbf0410f6d02096f0acc3599f6..4d5723a7a1369022c049f9e638d07b37caf326f6 100644 (file)
@@ -27,6 +27,7 @@
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/MutexGuard.h"
+#include "llvm/Target/TargetLowering.h"
 
 using namespace llvm;
 
@@ -301,7 +302,7 @@ uint64_t MCJIT::getSymbolAddress(const std::string &Name,
     object::Archive *A = *I;
     // Look for our symbols in each Archive
     object::Archive::child_iterator ChildIt = A->findSym(Name);
-    if (ChildIt != A->end_children()) {
+    if (ChildIt != A->child_end()) {
       OwningPtr<object::Binary> ChildBin;
       // FIXME: Support nested archives?
       if (!ChildIt->getAsBinary(ChildBin) && ChildBin->isObject()) {
@@ -371,7 +372,7 @@ void *MCJIT::getPointerToFunction(Function *F) {
   // load address of the symbol, not the local address.
   Mangler Mang(TM->getDataLayout());
   SmallString<128> Name;
-  Mang.getNameWithPrefix(Name, F);
+  TM->getTargetLowering()->getNameWithPrefix(Name, F, Mang);
   return (void*)Dyld.getSymbolLoadAddress(Name);
 }