Replace dynamic_cast with dyn_cast for llvm objects

上级 558c710c
...@@ -711,7 +711,7 @@ class CodegenUtilsTest : public ::testing::Test { ...@@ -711,7 +711,7 @@ class CodegenUtilsTest : public ::testing::Test {
llvm::Constant* constant = codegen_utils_->GetConstant<IntegerSrcType>( llvm::Constant* constant = codegen_utils_->GetConstant<IntegerSrcType>(
static_cast<IntegerSrcType>(integer_constant)); static_cast<IntegerSrcType>(integer_constant));
llvm::Constant* casted_constant = llvm::Constant* casted_constant =
dynamic_cast<llvm::Constant*>( llvm::dyn_cast<llvm::Constant>(
codegen_utils_->CreateCast<IntegerDestType, IntegerSrcType>( codegen_utils_->CreateCast<IntegerDestType, IntegerSrcType>(
constant)); constant));
CheckGetSingleIntegerConstant(integer_constant, casted_constant); CheckGetSingleIntegerConstant(integer_constant, casted_constant);
...@@ -807,7 +807,7 @@ class CodegenUtilsTest : public ::testing::Test { ...@@ -807,7 +807,7 @@ class CodegenUtilsTest : public ::testing::Test {
llvm::Constant* constant = codegen_utils_->GetConstant<FloatSrcType>( llvm::Constant* constant = codegen_utils_->GetConstant<FloatSrcType>(
static_cast<FloatSrcType>(fp_constant)); static_cast<FloatSrcType>(fp_constant));
llvm::Constant* casted_constant = llvm::Constant* casted_constant =
dynamic_cast<llvm::Constant*>( llvm::dyn_cast<llvm::Constant>(
codegen_utils_->CreateCast<FloatDestType, FloatSrcType>(constant)); codegen_utils_->CreateCast<FloatDestType, FloatSrcType>(constant));
CheckGetSingleFloatingPointConstant(fp_constant, casted_constant); CheckGetSingleFloatingPointConstant(fp_constant, casted_constant);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册