Do not use unique pointers. NFC.

These unique pointers have the exact same lifetime as automatic
variables, so use automatic variables instead.

llvm-svn: 245281
This commit is contained in:
Rui Ueyama 2015-08-18 09:13:25 +00:00
parent 95b781d863
commit 570752c7ac
2 changed files with 6 additions and 6 deletions

View File

@ -44,10 +44,10 @@ Configuration *Config;
LinkerDriver *Driver;
void link(llvm::ArrayRef<const char *> Args) {
auto C = make_unique<Configuration>();
Config = C.get();
auto D = make_unique<LinkerDriver>();
Driver = D.get();
Configuration C;
LinkerDriver D;
Config = &C;
Driver = &D;
return Driver->link(Args);
}

View File

@ -25,8 +25,8 @@ namespace elf2 {
Configuration *Config;
void link(ArrayRef<const char *> Args) {
auto C = make_unique<Configuration>();
Config = C.get();
Configuration C;
Config = &C;
LinkerDriver().link(Args.slice(1));
}