From: Benjamin Kramer Date: Mon, 30 Jan 2017 23:11:29 +0000 (+0000) Subject: [ICP] Fix bool conversion warning and actually write out the reason instead of droppi... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cc71b6de7d98be613ff78c1f614cb1a0c6136c1c;p=llvm [ICP] Fix bool conversion warning and actually write out the reason instead of dropping it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293564 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp b/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp index d520c956c28..384407b7129 100644 --- a/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp +++ b/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp @@ -216,7 +216,7 @@ bool llvm::isLegalToPromote(Instruction *Inst, Function *F, continue; if (!CastInst::castIsValid(Instruction::BitCast, CS.getArgument(I), PTy)) { if (Reason) - return "Argument Type mismatch"; + *Reason = "Argument type mismatch"; return false; } }