mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[g-arc-opts] Perform sanity check that we do not merge Argument paths with non-Argument tracking paths correctly.
This was a sanity check that I through in that makes sure that we do not try to merge together an @owned argument we are tracking with an instruction. rdar://17634697 Swift SVN r19967
This commit is contained in:
@@ -238,12 +238,11 @@ bool TopDownRefCountState::merge(const TopDownRefCountState &Other) {
|
||||
}
|
||||
|
||||
// We should never have an argument path merge with a non-argument path.
|
||||
if (!Argument.isNull()) {
|
||||
RefCountState<TopDownRefCountState>::clear();
|
||||
DEBUG(
|
||||
llvm::dbgs() << " Can not merge Argument with Non-Argument "
|
||||
"path... Bailing!\n");
|
||||
return false;
|
||||
if (Argument.isNull() != Other.Argument.isNull()) {
|
||||
RefCountState<TopDownRefCountState>::clear();
|
||||
DEBUG(llvm::dbgs() << " Can not merge Argument with "
|
||||
"Non-Argument path... Bailing!\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
Increments.insert(Other.Increments.begin(), Other.Increments.end());
|
||||
|
||||
Reference in New Issue
Block a user