r600/sfn: Fix test compilation with -fno-rtti
79ca456b48
reintroduced the use
of dynamic_cast<> in r600/sfn tests. This breaks compilation with
-fno-rtti, as required to build against the LLVM configuration
recommended upstream. Use static_cast<> instead to fix this.
Fixes: #7820
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20239>
This commit is contained in:
@@ -224,11 +224,14 @@ TEST_F(ValuefactoryTest, test_create_const)
|
||||
PVirtualValue value1 = factory->src(alu->src[0], 0);
|
||||
PVirtualValue value2 = factory->src(alu->src[1], 0);
|
||||
|
||||
const auto& cvalue1 = dynamic_cast<const LiteralConstant&>(*value1);
|
||||
const auto& cvalue2 = dynamic_cast<const LiteralConstant&>(*value2);
|
||||
const auto* cvalue1 = value1->as_literal();
|
||||
const auto* cvalue2 = value2->as_literal();
|
||||
|
||||
EXPECT_EQ(cvalue1.value(), 2);
|
||||
EXPECT_EQ(cvalue2.value(), 4);
|
||||
ASSERT_TRUE(cvalue1);
|
||||
ASSERT_TRUE(cvalue2);
|
||||
|
||||
EXPECT_EQ(cvalue1->value(), 2);
|
||||
EXPECT_EQ(cvalue2->value(), 4);
|
||||
}
|
||||
|
||||
TEST_F(ValuefactoryTest, test_create_sysvalue)
|
||||
|
Reference in New Issue
Block a user