mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
[PM] Stop playing fast and loose with rebinding of references. However
convenient it is to imagine a world where this works, that is not C++ as was pointed out in review. The standard even goes to some lengths to preclude any attempt at this, for better or worse. Maybe better. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203775 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -171,14 +171,14 @@ char FunctionAnalysisManagerModuleProxy::PassID;
|
||||
|
||||
FunctionAnalysisManagerModuleProxy::Result
|
||||
FunctionAnalysisManagerModuleProxy::run(Module *M) {
|
||||
assert(FAM.empty() && "Function analyses ran prior to the module proxy!");
|
||||
return Result(FAM);
|
||||
assert(FAM->empty() && "Function analyses ran prior to the module proxy!");
|
||||
return Result(*FAM);
|
||||
}
|
||||
|
||||
FunctionAnalysisManagerModuleProxy::Result::~Result() {
|
||||
// Clear out the analysis manager if we're being destroyed -- it means we
|
||||
// didn't even see an invalidate call when we got invalidated.
|
||||
FAM.clear();
|
||||
FAM->clear();
|
||||
}
|
||||
|
||||
bool FunctionAnalysisManagerModuleProxy::Result::invalidate(
|
||||
@@ -188,7 +188,7 @@ bool FunctionAnalysisManagerModuleProxy::Result::invalidate(
|
||||
// objects in the cache making it impossible to incrementally preserve them.
|
||||
// Just clear the entire manager.
|
||||
if (!PA.preserved(ID()))
|
||||
FAM.clear();
|
||||
FAM->clear();
|
||||
|
||||
// Return false to indicate that this result is still a valid proxy.
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user