From 8df87095fc33af80e12fb883a6ccf8463518b8e2 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Tue, 16 Jan 2007 22:38:10 +0000 Subject: [PATCH] Pass manager may require certain analysis. In such cases, initially pass manager is last user. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33273 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/PassManager.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 1e3b48ee686..6f0c4527be3 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -600,10 +600,9 @@ void PMDataManager::add(Pass *P, // Set P as P's last user until someone starts using P. // However, if P is a Pass Manager then it does not need // to record its last user. - if (!dynamic_cast(P)) { + if (!dynamic_cast(P)) LastUses.push_back(P); - TPM->setLastUser(LastUses, P); - } + TPM->setLastUser(LastUses, P); // Take a note of analysis required and made available by this pass. // Remove the analysis not preserved by this pass