mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
unique_ptrify a bunch of stuff through RuntimeDyld::loadObject
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217065 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -203,8 +203,8 @@ static int printLineInfoForInput() {
|
||||
|
||||
std::unique_ptr<ObjectImage> LoadedObject;
|
||||
// Load the object file
|
||||
LoadedObject.reset(
|
||||
Dyld.loadObject(new ObjectBuffer(InputBuffer.get().release())));
|
||||
LoadedObject = Dyld.loadObject(
|
||||
llvm::make_unique<ObjectBuffer>(std::move(*InputBuffer)));
|
||||
if (!LoadedObject) {
|
||||
return Error(Dyld.getErrorString());
|
||||
}
|
||||
@@ -264,8 +264,8 @@ static int executeInput() {
|
||||
return Error("unable to read input: '" + EC.message() + "'");
|
||||
std::unique_ptr<ObjectImage> LoadedObject;
|
||||
// Load the object file
|
||||
LoadedObject.reset(
|
||||
Dyld.loadObject(new ObjectBuffer(InputBuffer.get().release())));
|
||||
LoadedObject = Dyld.loadObject(
|
||||
llvm::make_unique<ObjectBuffer>(std::move(*InputBuffer)));
|
||||
if (!LoadedObject) {
|
||||
return Error(Dyld.getErrorString());
|
||||
}
|
||||
@@ -427,8 +427,8 @@ static int linkAndVerify() {
|
||||
|
||||
std::unique_ptr<ObjectImage> LoadedObject;
|
||||
// Load the object file
|
||||
LoadedObject.reset(
|
||||
Dyld.loadObject(new ObjectBuffer(InputBuffer.get().release())));
|
||||
LoadedObject = Dyld.loadObject(
|
||||
llvm::make_unique<ObjectBuffer>(std::move(*InputBuffer)));
|
||||
if (!LoadedObject) {
|
||||
return Error(Dyld.getErrorString());
|
||||
}
|
||||
|
Reference in New Issue
Block a user