diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2014-03-13 09:50:31 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2014-03-13 09:50:31 +0000 |
commit | b07f378fc894d9881f17d2dc93532d4337315a29 (patch) | |
tree | fe3011497a221dc9fa3bb3dc0b95da0ec68d6fed /llvm/lib | |
parent | eb4d0607bf5b61edbeab0cadd277bddfa9edb962 (diff) | |
download | bcm5719-llvm-b07f378fc894d9881f17d2dc93532d4337315a29.tar.gz bcm5719-llvm-b07f378fc894d9881f17d2dc93532d4337315a29.zip |
[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. =]
llvm-svn: 203775
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/IR/PassManager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/IR/PassManager.cpp b/llvm/lib/IR/PassManager.cpp index 88464e0ef0e..9358191d873 100644 --- a/llvm/lib/IR/PassManager.cpp +++ b/llvm/lib/IR/PassManager.cpp @@ -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; |