mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Turn the analysis invalidation code into an early exit. NFC.
Swift SVN r26450
This commit is contained in:
@@ -99,16 +99,16 @@ public:
|
||||
}
|
||||
|
||||
virtual void invalidate(SILAnalysis::PreserveKind K) {
|
||||
if (!(K & PreserveKind::Branches)) {
|
||||
FunctionToPOTMap.clear();
|
||||
}
|
||||
if (K & PreserveKind::Branches) return;
|
||||
|
||||
FunctionToPOTMap.clear();
|
||||
}
|
||||
|
||||
virtual void invalidate(SILFunction* F, SILAnalysis::PreserveKind K) {
|
||||
if (!(K & PreserveKind::Branches)) {
|
||||
// Invalidate just this one function. We will lazily recompute it.
|
||||
FunctionToPOTMap[F].IsInvalidated = true;
|
||||
}
|
||||
if (K & PreserveKind::Branches) return;
|
||||
|
||||
// Invalidate just this one function. We will lazily recompute it.
|
||||
FunctionToPOTMap[F].IsInvalidated = true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user