diff options
author | Dan Gohman <gohman@apple.com> | 2008-11-04 16:03:56 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-11-04 16:03:56 +0000 |
commit | ce3108a2d8f887e71128dfa976bce8f725572337 (patch) | |
tree | 4fd268fffcfad3eecd8a828ab60285f586955a29 /lib/VMCore | |
parent | 97cf0039a4712001d68f659284cd8301a0102b9c (diff) | |
download | external_llvm-ce3108a2d8f887e71128dfa976bce8f725572337.zip external_llvm-ce3108a2d8f887e71128dfa976bce8f725572337.tar.gz external_llvm-ce3108a2d8f887e71128dfa976bce8f725572337.tar.bz2 |
Add some asserts to verify MVT invariant assumptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58701 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/ValueTypes.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/VMCore/ValueTypes.cpp b/lib/VMCore/ValueTypes.cpp index 99dc1de..d02a538 100644 --- a/lib/VMCore/ValueTypes.cpp +++ b/lib/VMCore/ValueTypes.cpp @@ -20,12 +20,14 @@ using namespace llvm; MVT MVT::getExtendedIntegerVT(unsigned BitWidth) { MVT VT; VT.LLVMTy = IntegerType::get(BitWidth); + assert(VT.isExtended() && "Type is not extended!"); return VT; } MVT MVT::getExtendedVectorVT(MVT VT, unsigned NumElements) { MVT ResultVT; ResultVT.LLVMTy = VectorType::get(VT.getTypeForMVT(), NumElements); + assert(ResultVT.isExtended() && "Type is not extended!"); return ResultVT; } |