forked from OSchip/llvm-project
Replace StringRef with std::string in LinkerDriver::addLibrary(StringRef Name) because std::string is destroyed after assigning what fills the buffer with garbage and StringRef is no more valid.
That fixes few failing tests under windows+msvs2015(debug). llvm-svn: 259186
This commit is contained in:
parent
24785bd0b8
commit
2c9b7bd326
|
@ -114,7 +114,7 @@ void LinkerDriver::addFile(StringRef Path) {
|
|||
|
||||
// Add a given library by searching it from input search paths.
|
||||
void LinkerDriver::addLibrary(StringRef Name) {
|
||||
StringRef Path = searchLibrary(Name);
|
||||
std::string Path = searchLibrary(Name);
|
||||
if (Path.empty())
|
||||
error("Unable to find library -l" + Name);
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue