From d9911e21df4705bfe2272cd23bb293f7cf6ffdd8 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 29 Oct 2007 20:14:29 +0000 Subject: Do a real assert if there is an unhandled vector instruction instead of just printing to cerr. llvm-svn: 43466 --- llvm/lib/Transforms/Scalar/LowerPacked.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Transforms/Scalar/LowerPacked.cpp') diff --git a/llvm/lib/Transforms/Scalar/LowerPacked.cpp b/llvm/lib/Transforms/Scalar/LowerPacked.cpp index 24a9cc20ee9..515995ebbef 100644 --- a/llvm/lib/Transforms/Scalar/LowerPacked.cpp +++ b/llvm/lib/Transforms/Scalar/LowerPacked.cpp @@ -76,13 +76,13 @@ public: void visitInsertElementInst(InsertElementInst& IE); /// This function asserts if the instruction is a VectorType but - /// is handled by another function. + /// is not handled by another function. /// /// @brief Asserts if VectorType instruction is not handled elsewhere. /// @param I the unhandled instruction void visitInstruction(Instruction &I) { - if (isa(I.getType())) - cerr << "Unhandled Instruction with Packed ReturnType: " << I << '\n'; + assert(!isa(I.getType()) && + "Unhandled Instruction with Packed ReturnType!"); } private: /// @brief Retrieves lowered values for a packed value. -- cgit v1.2.3