diff options
author | George Rimar <grimar@accesssoftek.com> | 2016-01-29 10:52:52 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2016-01-29 10:52:52 +0000 |
commit | 2c9b7bd3263c6f0239d9b26feb595b8b98197f19 (patch) | |
tree | c2c490bab9507bb80a8586bf5e3af8c2a0ac1a77 | |
parent | 24785bd0b8a322c832550f3521d19e4aa6782dc0 (diff) | |
download | bcm5719-llvm-2c9b7bd3263c6f0239d9b26feb595b8b98197f19.tar.gz bcm5719-llvm-2c9b7bd3263c6f0239d9b26feb595b8b98197f19.zip |
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
-rw-r--r-- | lld/ELF/Driver.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index 7909336f44b..2b0789b972f 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -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 |