Constant::IsThreadDependent(): Use dyn_cast<Constant> instead of cast
authorHans Wennborg <hans@hanshq.net>
Fri, 16 Nov 2012 10:33:25 +0000 (10:33 +0000)
committerHans Wennborg <hans@hanshq.net>
Fri, 16 Nov 2012 10:33:25 +0000 (10:33 +0000)
commit18aa124075859c5b1fd97cf39bd5bef1763acc4b
treea5eab930d41215bb2df60875d4dc7d4dfc20eb0a
parent038e3489d9669ba05dae613ddd3b573740b49b49
Constant::IsThreadDependent(): Use dyn_cast<Constant> instead of cast

It turns out that the operands of a Constant are not always themselves
Constant. For example, one of the operands of BlockAddress is
BasicBlock, which is not a Constant.

This should fix the dragonegg-x86_64-linux-gcc-4.6-test build which
broke in r168037.

llvm-svn: 168147
llvm/lib/VMCore/Constants.cpp
llvm/test/Transforms/GlobalOpt/blockaddress.ll [new file with mode: 0644]