[PATCH] D73683: Inline debug variable.

Michael Forster via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 30 01:21:17 PST 2020


MForster created this revision.
MForster added a reviewer: gribozavr2.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: sstefan1.
Herald added a project: LLVM.
gribozavr2 accepted this revision.
This revision is now accepted and ready to land.

In a release build this variable becomes unused and may break the build
with `-Werror,-Wunused-variable`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73683

Files:
  llvm/lib/Transforms/IPO/Attributor.cpp


Index: llvm/lib/Transforms/IPO/Attributor.cpp
===================================================================
--- llvm/lib/Transforms/IPO/Attributor.cpp
+++ llvm/lib/Transforms/IPO/Attributor.cpp
@@ -13,7 +13,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/Transforms/IPO/Attributor.h"
+#include "llvm/Transforms/IPO/Attributor.h" 
 
 #include "llvm/ADT/DepthFirstIterator.h"
 #include "llvm/ADT/STLExtras.h"
@@ -4992,7 +4992,6 @@
     // Helper to check if for the given call site the associated argument is
     // passed to a callback where the privatization would be different.
     auto IsCompatiblePrivArgOfCallback = [&](CallSite CS) {
-      Value *CSArgOp = CS.getArgOperand(ArgNo);
       SmallVector<const Use *, 4> CBUses;
       AbstractCallSite::getCallbackUses(CS, CBUses);
       for (const Use *U : CBUses) {
@@ -5010,7 +5009,8 @@
                    "callback ("
                 << CBArgNo << "@" << CBACS.getCalledFunction()->getName()
                 << ")\n[AAPrivatizablePtr] " << CBArg << " : "
-                << CBACS.getCallArgOperand(CBArg) << " vs " << CSArgOp << "\n"
+                << CBACS.getCallArgOperand(CBArg) << " vs "
+                << CS.getArgOperand(ArgNo) << "\n"
                 << "[AAPrivatizablePtr] " << CBArg << " : "
                 << CBACS.getCallArgOperandNo(CBArg) << " vs " << ArgNo << "\n";
           });


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73683.241366.patch
Type: text/x-patch
Size: 1435 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200130/834f6884/attachment.bin>


More information about the llvm-commits mailing list