[PATCH] D36201: Merge manifest namespaces.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 16 17:56:26 PDT 2017


ruiu added inline comments.


================
Comment at: llvm/lib/WindowsManifest/WindowsManifestMerger.cpp:217
+          return E;
+      } else if (namespaceOverrides(OriginalAttribute->ns->href,
+                                    Attribute->ns->href)) {
----------------
ecbeckmann wrote:
> ruiu wrote:
> > ruiu wrote:
> > > It's good to do `continue` here, as early continues are preferred.
> > It's not done.
> are you referring to the if block or the else if block?  Because on this comment's revision it refers to the else if and I have added a continue since then.
What I was saying is that, if you have this code

  for (...) {
    if (...) {
      if (...) {
        ...
      } else {
        ...
      }
    } else if (...) {
      ...
    } else if (...) {
      ...
    }
  }

then you can rewrite it with early continues like this:

  for (...) {
    if (...) {
      if (...) {
        ...
        continue;
      }
      ...
      continue;
    }

    if (...) {
      ...
      continue;
    }

    ...
  }



https://reviews.llvm.org/D36201





More information about the llvm-commits mailing list