From 676c29694c5444ca3c63067770dfac0f37158797 Mon Sep 17 00:00:00 2001 From: Michael Forster Date: Thu, 30 Jan 2020 10:20:49 +0100 Subject: [PATCH] Inline debug variable. 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp index b23df54..1e45d3c 100644 --- a/llvm/lib/Transforms/IPO/Attributor.cpp +++ b/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 @@ 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 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"; }); -- 2.7.4