summaryrefslogtreecommitdiffstats
path: root/lld/COFF/DriverUtils.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2017-09-05 21:17:32 +0000
committerRui Ueyama <ruiu@google.com>2017-09-05 21:17:32 +0000
commit2ea27186b4bac2a124aaef7788707d3b48c719a8 (patch)
tree87f54254991a4b8fef1266ff78d42745cf098ecc /lld/COFF/DriverUtils.cpp
parent8b80b328d1c0103b62a3af2b97dd392d22e2bc85 (diff)
downloadbcm5719-llvm-2ea27186b4bac2a124aaef7788707d3b48c719a8.tar.gz
bcm5719-llvm-2ea27186b4bac2a124aaef7788707d3b48c719a8.zip
Use raw_string_ostream::str to get a result string.
Looks like raw_string_ostream is buffered. If we do not call `flush` nor `str`, it is not guaranteed that a result string has all characters that were written to it. It wasn't failing on buildbots, but I could reproduce the issue on my Windows workstation. llvm-svn: 312577
Diffstat (limited to 'lld/COFF/DriverUtils.cpp')
-rw-r--r--lld/COFF/DriverUtils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/COFF/DriverUtils.cpp b/lld/COFF/DriverUtils.cpp
index df600dd5243..cf7f95f20ca 100644
--- a/lld/COFF/DriverUtils.cpp
+++ b/lld/COFF/DriverUtils.cpp
@@ -357,7 +357,7 @@ static std::string createDefaultXml() {
<< " </dependency>\n";
}
OS << "</assembly>\n";
- return Ret;
+ return OS.str();
}
static Expected<std::unique_ptr<MemoryBuffer>>
OpenPOWER on IntegriCloud