Inline debug variable.
authorMichael Forster <forster@google.com>
Thu, 30 Jan 2020 09:20:49 +0000 (10:20 +0100)
committerDmitri Gribenko <gribozavr@gmail.com>
Thu, 30 Jan 2020 09:29:24 +0000 (10:29 +0100)
Summary:
In a release build this variable becomes unused and may break the build
with `-Werror,-Wunused-variable`.

Reviewers: gribozavr2, jdoerfert, sstefan1

Reviewed By: gribozavr2

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73683

llvm/lib/Transforms/IPO/Attributor.cpp

index b23df54..1e45d3c 100644 (file)
@@ -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 @@ struct AAPrivatizablePtrArgument final : public AAPrivatizablePtrImpl {
     // 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 @@ struct AAPrivatizablePtrArgument final : public AAPrivatizablePtrImpl {
                    "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";
           });