[pkg-d-commits] [ldc] 85/95: LLVM 5.0: paramHasAttr first argument meaning changed (minus 1)

Matthias Klumpp mak at moszumanska.debian.org
Thu Jul 13 20:54:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

mak pushed a commit to annotated tag v1.3.0-beta1
in repository ldc.

commit 67200391686144fe1d887c012a7e75c20cfe57fd
Author: Johan Engelen <jbc.engelen at gmail.com>
Date:   Thu Apr 20 00:07:19 2017 +0200

    LLVM 5.0: paramHasAttr first argument meaning changed (minus 1)
    
    See http://llvm.org/viewvc/llvm-project?view=revision&revision=300367
---
 gen/passes/GarbageCollect2Stack.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gen/passes/GarbageCollect2Stack.cpp b/gen/passes/GarbageCollect2Stack.cpp
index e6eeb24..c4ec02f 100644
--- a/gen/passes/GarbageCollect2Stack.cpp
+++ b/gen/passes/GarbageCollect2Stack.cpp
@@ -870,7 +870,13 @@ bool isSafeToStackAllocate(BasicBlock::iterator Alloc, Value *V, DominatorTree &
       CallSite::arg_iterator B = CS.arg_begin(), E = CS.arg_end();
       for (CallSite::arg_iterator A = B; A != E; ++A) {
         if (A->get() == V) {
-          if (!CS.paramHasAttr(A - B + 1, LLAttribute::NoCapture)) {
+#if LDC_LLVM_VER < 500
+          const unsigned paramHasAttr_firstArg = 1;
+#else
+          const unsigned paramHasAttr_firstArg = 0;
+#endif
+          if (!CS.paramHasAttr(A - B + paramHasAttr_firstArg,
+                               LLAttribute::NoCapture)) {
             // The parameter is not marked 'nocapture' - captured.
             return false;
           }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git



More information about the pkg-d-commits mailing list