unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob ec0a8238a768126dadb0ce8d651786f5fff831a7 858 bytes (raw)
name: gnu/packages/patches/llvm-D46460.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 
Index: lib/Analysis/LoopInfo.cpp
===================================================================
--- a/lib/Analysis/LoopInfo.cpp
+++ b/lib/Analysis/LoopInfo.cpp
@@ -223,15 +223,14 @@
     BasicBlock *H = getHeader();
     for (BasicBlock *BB : this->blocks()) {
       TerminatorInst *TI = BB->getTerminator();
-      MDNode *MD = nullptr;
 
       // Check if this terminator branches to the loop header.
-      for (BasicBlock *Successor : TI->successors()) {
-        if (Successor == H) {
-          MD = TI->getMetadata(LLVMContext::MD_loop);
-          break;
-        }
-      }
+      bool IsPredecessor = any_of(TI->successors(),
+        [=](BasicBlock *Successor) { return Successor == H; });
+      if (!IsPredecessor)
+        continue;
+
+      MDNode *MD = TI->getMetadata(LLVMContext::MD_loop);
       if (!MD)
         return nullptr;
 

debug log:

solving ec0a8238a ...
found ec0a8238a in https://yhetil.org/guix-patches/20190423094936.27413-1-anothersms@gmail.com/ ||
	https://yhetil.org/guix-patches/20190425075114.10284-1-anothersms@gmail.com/

applying [1/1] https://yhetil.org/guix-patches/20190423094936.27413-1-anothersms@gmail.com/
diff --git a/gnu/packages/patches/llvm-D46460.patch b/gnu/packages/patches/llvm-D46460.patch
new file mode 100644
index 0000000000..ec0a8238a7

1:16: trailing whitespace.
 
1:32: trailing whitespace.
 
Checking patch gnu/packages/patches/llvm-D46460.patch...
1:32: new blank line at EOF.
+
Applied patch gnu/packages/patches/llvm-D46460.patch cleanly.
warning: 3 lines add whitespace errors.

skipping https://yhetil.org/guix-patches/20190425075114.10284-1-anothersms@gmail.com/ for ec0a8238a7
index at:
100644 ec0a8238a768126dadb0ce8d651786f5fff831a7	gnu/packages/patches/llvm-D46460.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).