aboutsummaryrefslogtreecommitdiff
path: root/backend/unittests/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'backend/unittests/CodeGen')
-rw-r--r--backend/unittests/CodeGen/MachineFunctionClonerTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/backend/unittests/CodeGen/MachineFunctionClonerTest.cpp b/backend/unittests/CodeGen/MachineFunctionClonerTest.cpp
index 9d8ffd2..e923108 100644
--- a/backend/unittests/CodeGen/MachineFunctionClonerTest.cpp
+++ b/backend/unittests/CodeGen/MachineFunctionClonerTest.cpp
@@ -800,11 +800,11 @@ void testCloneFailures(TestContext &Context) {
rcc::MachineFunctionCloneOptions{
rcc::MachineFunctionStableID::fromValue(0), std::nullopt}),
"clone must reject an invalid destination StableID");
- Context.expect(
- !rcc::cloneMachineFunction(*Source, *Target,
- rcc::MachineFunctionCloneOptions{
- rcc::MachineFunctionStableID::fromValue(3), std::string()}),
- "clone must reject an explicitly empty destination name");
+ auto EmptyName = rcc::cloneMachineFunction(
+ *Source, *Target,
+ rcc::MachineFunctionCloneOptions{rcc::MachineFunctionStableID::fromValue(3), std::string()});
+ Context.expect(EmptyName && EmptyName->ClonedFunction->name().empty(),
+ "clone must preserve an explicitly empty destination name");
auto Invalid = createFunction(Context, "invalid_source", 4);
rcc::MachineBasicBlock *Block = Invalid ? createBlock(Context, *Invalid) : nullptr;