[llvm-commits] [llvm] r43466 - /llvm/trunk/lib/Transforms/Scalar/LowerPacked.cpp

Dan Gohman djg at cray.com
Mon Oct 29 13:14:29 PDT 2007


Author: djg
Date: Mon Oct 29 15:14:29 2007
New Revision: 43466

URL: http://llvm.org/viewvc/llvm-project?rev=43466&view=rev
Log:
Do a real assert if there is an unhandled vector instruction instead
of just printing to cerr.

Modified:
    llvm/trunk/lib/Transforms/Scalar/LowerPacked.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LowerPacked.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LowerPacked.cpp?rev=43466&r1=43465&r2=43466&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LowerPacked.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LowerPacked.cpp Mon Oct 29 15:14:29 2007
@@ -76,13 +76,13 @@
    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<VectorType>(I.getType()))
-       cerr << "Unhandled Instruction with Packed ReturnType: " << I << '\n';
+     assert(!isa<VectorType>(I.getType()) &&
+            "Unhandled Instruction with Packed ReturnType!");
    }
 private:
    /// @brief Retrieves lowered values for a packed value.





More information about the llvm-commits mailing list