[PATCH] D35753: llvm-mt: implement simple merging of manifests, not factoring namespaces.
Eric Beckmann via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 24 17:06:20 PDT 2017
ecbeckmann added inline comments.
================
Comment at: llvm/lib/Support/WindowsManifestMerger.cpp:99
+ XMLNodeImpl OriginalChildWithName;
+ if ((strcmp(reinterpret_cast<const char *>(Child->name), "text") != 0) &&
+ (strcmp(reinterpret_cast<const char *>(Child->name), "comment") !=
----------------
ruiu wrote:
> ruiu wrote:
> > Do you need this reinterpret_cast? It looks like Child->name is of `xmlChar *` which is a typedef to `unsigned char *`.
> Reverse the condition so that you can `continue` early.
unfortunately const char * and const unsigned char * are technically not related types, and must be casted back and forth to each other.
================
Comment at: llvm/lib/Support/WindowsManifestMerger.cpp:126
+#if LLVM_LIBXML2_ENABLED
+ for(auto& Doc : MergedDocs)
+ xmlFreeDoc(Doc);
----------------
ruiu wrote:
> Format
where is format error here?
https://reviews.llvm.org/D35753
More information about the llvm-commits
mailing list