forked from OSchip/llvm-project
Free 'TheTargetCodeGenInfo' in the class CodeGenModule. This looks like an obvious memory leak that was reported from LLDB devs. The comment indicates the leak is deliberate, but I have no idea why this needs to be so. Please comment/revert if you know otherwise.
llvm-svn: 141479
This commit is contained in:
parent
892d898605
commit
c168e50722
|
@ -117,6 +117,7 @@ CodeGenModule::~CodeGenModule() {
|
|||
delete ObjCRuntime;
|
||||
delete OpenCLRuntime;
|
||||
delete CUDARuntime;
|
||||
delete TheTargetCodeGenInfo;
|
||||
delete &ABI;
|
||||
delete TBAA;
|
||||
delete DebugInfo;
|
||||
|
|
|
@ -3217,9 +3217,6 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() {
|
|||
if (TheTargetCodeGenInfo)
|
||||
return *TheTargetCodeGenInfo;
|
||||
|
||||
// For now we just cache the TargetCodeGenInfo in CodeGenModule and don't
|
||||
// free it.
|
||||
|
||||
const llvm::Triple &Triple = getContext().getTargetInfo().getTriple();
|
||||
switch (Triple.getArch()) {
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue