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:
Ted Kremenek 2011-10-08 05:28:26 +00:00
parent 892d898605
commit c168e50722
2 changed files with 1 additions and 3 deletions

View File

@ -117,6 +117,7 @@ CodeGenModule::~CodeGenModule() {
delete ObjCRuntime;
delete OpenCLRuntime;
delete CUDARuntime;
delete TheTargetCodeGenInfo;
delete &ABI;
delete TBAA;
delete DebugInfo;

View File

@ -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: