forked from OSchip/llvm-project
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:
parent
95b781d863
commit
570752c7ac
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue