[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
Tue Jul 25 12:50:32 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:
> ecbeckmann wrote:
> > 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.
> Is it done?
Oh sorry I assumed you meant the isMergeableElement should be checked first.


https://reviews.llvm.org/D35753





More information about the llvm-commits mailing list