[PATCH] D35425: Implement parsing and writing of a single xml manifest file.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 19 12:01:47 PDT 2017
ruiu added inline comments.
================
Comment at: llvm/include/llvm/Support/WindowsManifestMerger.h:76
+#endif
\ No newline at end of file
----------------
Fix this. (It doesn't say that you need a blank line at end of a file, but it says that your last line doesn't end with '\n'.)
================
Comment at: llvm/lib/Support/WindowsManifestMerger.cpp:51-54
+ if (BufferSize > 0)
+ OutputBuffer = MemoryBuffer::getMemBuffer(
+ StringRef(reinterpret_cast<const char *>(XmlBuff), (size_t)BufferSize));
+ return OutputBuffer;
----------------
You can eliminate `OutputBuffer` by doing this:
if (BufferSize == 0)
return nullptr;
return MemoryBuffer::getMemBuffer(
StringRef(reinterpret_cast<const char *>(XmlBuff), (size_t)BufferSize));
================
Comment at: llvm/tools/llvm-mt/llvm-mt.cpp:146
+ if (!OutputBuffer) {
+ outs() << "llvm-mt: empty manifest not written\n";
+ } else {
----------------
Isn't this an error? Looks like this program exits with 0 in this case.
https://reviews.llvm.org/D35425
More information about the llvm-commits
mailing list