Add assertions to CastInst::getCastOpcode to catch attempted conversions
authorDan Gohman <gohman@apple.com>
Mon, 18 May 2009 18:18:57 +0000 (18:18 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 18 May 2009 18:18:57 +0000 (18:18 +0000)
commitc7897e26a45b06fc8c739443fb75c9c6bb908ec5
treeb444fa8177b6a6eaa3c71d0885bf7704ef293505
parent15ffc0826782bb498f4ea2722aa15f28cffd04ec
Add assertions to CastInst::getCastOpcode to catch attempted conversions
between integers and pointers when the source type is marked signed,
since inttoptr and ptrtoint always use zero-extension when the destination
is larger than the source.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72025 91177308-0d34-0410-b5e6-96231b3b80d8
lib/VMCore/Instructions.cpp