diff options
author | Matthias Braun <matze@braunis.de> | 2014-12-12 01:27:01 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2014-12-12 01:27:01 +0000 |
commit | 0880c6098fc266e6eef4f9e14505e40af877aa1c (patch) | |
tree | 0a41ea134390beee6d1524af73cfac5898c56441 /llvm/lib/IR/LegacyPassManager.cpp | |
parent | 93f6d6904f151c2118b58c473a8392e19a7366b0 (diff) | |
download | llvm-0880c6098fc266e6eef4f9e14505e40af877aa1c.zip llvm-0880c6098fc266e6eef4f9e14505e40af877aa1c.tar.gz llvm-0880c6098fc266e6eef4f9e14505e40af877aa1c.tar.bz2 |
Document that PassManager::add() may delete the pass right away.
Also remove redundant documentation:
- doxygen will copy documentation to overriden methods.
- Use \copydoc on PIMPL classes instead of replicating the text.
llvm-svn: 224089
Diffstat (limited to 'llvm/lib/IR/LegacyPassManager.cpp')
-rw-r--r-- | llvm/lib/IR/LegacyPassManager.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp index 28fa74c..b9ab256 100644 --- a/llvm/lib/IR/LegacyPassManager.cpp +++ b/llvm/lib/IR/LegacyPassManager.cpp @@ -227,10 +227,7 @@ public: Pass(PT_PassManager, ID), PMDataManager(), PMTopLevelManager(new FPPassManager()), wasRun(false) {} - /// add - Add a pass to the queue of passes to run. This passes ownership of - /// the Pass to the PassManager. When the PassManager is destroyed, the pass - /// will be destroyed as well, so there is no need to delete the pass. This - /// implies that all passes MUST be allocated with 'new'. + /// \copydoc FunctionPassManager::add() void add(Pass *P) { schedulePass(P); } @@ -398,10 +395,7 @@ public: Pass(PT_PassManager, ID), PMDataManager(), PMTopLevelManager(new MPPassManager()) {} - /// add - Add a pass to the queue of passes to run. This passes ownership of - /// the Pass to the PassManager. When the PassManager is destroyed, the pass - /// will be destroyed as well, so there is no need to delete the pass. This - /// implies that all passes MUST be allocated with 'new'. + /// \copydoc PassManager::add() void add(Pass *P) { schedulePass(P); } @@ -1389,11 +1383,6 @@ FunctionPassManager::~FunctionPassManager() { delete FPM; } -/// add - Add a pass to the queue of passes to run. This passes -/// ownership of the Pass to the PassManager. When the -/// PassManager_X is destroyed, the pass will be destroyed as well, so -/// there is no need to delete the pass. (TODO delete passes.) -/// This implies that all passes MUST be allocated with 'new'. void FunctionPassManager::add(Pass *P) { FPM->add(P); } @@ -1749,10 +1738,6 @@ PassManager::~PassManager() { delete PM; } -/// add - Add a pass to the queue of passes to run. This passes ownership of -/// the Pass to the PassManager. When the PassManager is destroyed, the pass -/// will be destroyed as well, so there is no need to delete the pass. This -/// implies that all passes MUST be allocated with 'new'. void PassManager::add(Pass *P) { PM->add(P); } |