[PATCH] D16645: ELF: Report multiple errors from the driver.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 29 03:00:05 PST 2016


grimar added a subscriber: grimar.

================
Comment at: ELF/Driver.cpp:120
@@ +119,3 @@
+void LinkerDriver::addLibrary(StringRef Name) {
+  StringRef Path = searchLibrary(Name);
+  if (Path.empty())
----------------
This will not work. Problem is that searchLibrary() returns std::string which is destroyed after assigning buffer pointer to StringRef. Buffer is filled with garbage in debug and some tests under windows + msvs2015/debug were failing because of that.
r259186 fixes it:

```
std::string Path = searchLibrary(Name);
```


http://reviews.llvm.org/D16645





More information about the llvm-commits mailing list