[llvm] r293564 - [ICP] Fix bool conversion warning and actually write out the reason instead of dropping it.

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 15:11:30 PST 2017


Author: d0k
Date: Mon Jan 30 17:11:29 2017
New Revision: 293564

URL: http://llvm.org/viewvc/llvm-project?rev=293564&view=rev
Log:
[ICP] Fix bool conversion warning and actually write out the reason instead of dropping it.

Modified:
    llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp?rev=293564&r1=293563&r2=293564&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp Mon Jan 30 17:11:29 2017
@@ -216,7 +216,7 @@ bool llvm::isLegalToPromote(Instruction
       continue;
     if (!CastInst::castIsValid(Instruction::BitCast, CS.getArgument(I), PTy)) {
       if (Reason)
-        return "Argument Type mismatch";
+        *Reason = "Argument type mismatch";
       return false;
     }
   }




More information about the llvm-commits mailing list