mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 03:24:09 +00:00
The leak detector is dead, long live asan and valgrind.
In resent times asan and valgrind have found way more memory management bugs in llvm than the special purpose leak detector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224703 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -23,7 +23,6 @@
|
||||
#include "llvm/IR/InstIterator.h"
|
||||
#include "llvm/IR/IntrinsicInst.h"
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
#include "llvm/IR/LeakDetector.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/Support/ManagedStatic.h"
|
||||
#include "llvm/Support/RWMutex.h"
|
||||
@ -46,20 +45,13 @@ Argument::Argument(Type *Ty, const Twine &Name, Function *Par)
|
||||
: Value(Ty, Value::ArgumentVal) {
|
||||
Parent = nullptr;
|
||||
|
||||
// Make sure that we get added to a function
|
||||
LeakDetector::addGarbageObject(this);
|
||||
|
||||
if (Par)
|
||||
Par->getArgumentList().push_back(this);
|
||||
setName(Name);
|
||||
}
|
||||
|
||||
void Argument::setParent(Function *parent) {
|
||||
if (getParent())
|
||||
LeakDetector::addGarbageObject(this);
|
||||
Parent = parent;
|
||||
if (getParent())
|
||||
LeakDetector::removeGarbageObject(this);
|
||||
}
|
||||
|
||||
/// getArgNo - Return the index of this formal argument in its containing
|
||||
@ -260,9 +252,6 @@ Function::Function(FunctionType *Ty, LinkageTypes Linkage, const Twine &name,
|
||||
if (Ty->getNumParams())
|
||||
setValueSubclassData(1); // Set the "has lazy arguments" bit.
|
||||
|
||||
// Make sure that we get added to a function
|
||||
LeakDetector::addGarbageObject(this);
|
||||
|
||||
if (ParentModule)
|
||||
ParentModule->getFunctionList().push_back(this);
|
||||
|
||||
@ -309,11 +298,7 @@ bool Function::arg_empty() const {
|
||||
}
|
||||
|
||||
void Function::setParent(Module *parent) {
|
||||
if (getParent())
|
||||
LeakDetector::addGarbageObject(this);
|
||||
Parent = parent;
|
||||
if (getParent())
|
||||
LeakDetector::removeGarbageObject(this);
|
||||
}
|
||||
|
||||
// dropAllReferences() - This function causes all the subinstructions to "let
|
||||
|
Reference in New Issue
Block a user