summaryrefslogtreecommitdiff
path: root/lib/LTO
diff options
context:
space:
mode:
Diffstat (limited to 'lib/LTO')
-rw-r--r--lib/LTO/LTOCodeGenerator.cpp2
-rw-r--r--lib/LTO/LTOModule.cpp10
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/LTO/LTOCodeGenerator.cpp b/lib/LTO/LTOCodeGenerator.cpp
index 87ea01f926..d6ca41b8df 100644
--- a/lib/LTO/LTOCodeGenerator.cpp
+++ b/lib/LTO/LTOCodeGenerator.cpp
@@ -270,7 +270,7 @@ const void* LTOCodeGenerator::compile(size_t* length,
sys::fs::remove(NativeObjectPath);
return NULL;
}
- NativeObjectFile = BuffPtr.take();
+ NativeObjectFile = BuffPtr.release();
// remove temp files
sys::fs::remove(NativeObjectPath);
diff --git a/lib/LTO/LTOModule.cpp b/lib/LTO/LTOModule.cpp
index fb20806634..4e71be8b4b 100644
--- a/lib/LTO/LTOModule.cpp
+++ b/lib/LTO/LTOModule.cpp
@@ -83,7 +83,7 @@ bool LTOModule::isBitcodeFileForTarget(const char *path,
OwningPtr<MemoryBuffer> buffer;
if (MemoryBuffer::getFile(path, buffer))
return false;
- return isTargetMatch(buffer.take(), triplePrefix);
+ return isTargetMatch(buffer.release(), triplePrefix);
}
/// isTargetMatch - Returns 'true' if the memory buffer is for the specified
@@ -103,7 +103,7 @@ LTOModule *LTOModule::makeLTOModule(const char *path, TargetOptions options,
errMsg = ec.message();
return NULL;
}
- return makeLTOModule(buffer.take(), options, errMsg);
+ return makeLTOModule(buffer.release(), options, errMsg);
}
LTOModule *LTOModule::makeLTOModule(int fd, const char *path,
@@ -123,7 +123,7 @@ LTOModule *LTOModule::makeLTOModule(int fd, const char *path,
errMsg = ec.message();
return NULL;
}
- return makeLTOModule(buffer.take(), options, errMsg);
+ return makeLTOModule(buffer.release(), options, errMsg);
}
LTOModule *LTOModule::makeLTOModule(const void *mem, size_t length,
@@ -132,7 +132,7 @@ LTOModule *LTOModule::makeLTOModule(const void *mem, size_t length,
OwningPtr<MemoryBuffer> buffer(makeBuffer(mem, length, path));
if (!buffer)
return NULL;
- return makeLTOModule(buffer.take(), options, errMsg);
+ return makeLTOModule(buffer.release(), options, errMsg);
}
LTOModule *LTOModule::makeLTOModule(MemoryBuffer *buffer,
@@ -175,7 +175,7 @@ LTOModule *LTOModule::makeLTOModule(MemoryBuffer *buffer,
options);
m->materializeAllPermanently();
- LTOModule *Ret = new LTOModule(m.take(), target);
+ LTOModule *Ret = new LTOModule(m.release(), target);
// We need a MCContext set up in order to get mangled names of private
// symbols. It is a bit odd that we need to report uses and definitions