mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
Enable "garbage detection" of LLVM objects. Now users should be obnoxious
warnings. If they accidentally leak LLVM Value's. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3620 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "llvm/InstrTypes.h"
|
||||
#include "llvm/SymbolTable.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "Support/LeakDetector.h"
|
||||
#include <algorithm>
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
@@ -39,6 +40,9 @@ Value::~Value() {
|
||||
}
|
||||
#endif
|
||||
assert(Uses.begin() == Uses.end());
|
||||
|
||||
// There should be no uses of this object anymore, remove it.
|
||||
LeakDetector::removeGarbageObject(this);
|
||||
}
|
||||
|
||||
void Value::replaceAllUsesWith(Value *D) {
|
||||
|
||||
Reference in New Issue
Block a user