From 35e67d4387bbe3e7e17ee6b17eaa42eebb0eb9f1 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 5 Feb 2009 00:00:23 +0000 Subject: [PATCH] Unbreak CGFunctionInfo::Profile method and reenable caching of ABI information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63799 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGCall.cpp | 4 +--- lib/CodeGen/CGCall.h | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index a3dd877ce5..61c6653236 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -101,9 +101,7 @@ const CGFunctionInfo &CodeGenTypes::getFunctionInfo(QualType ResTy, // Construct the function info. FI = new CGFunctionInfo(ResTy, ArgTys); - - // FIXME: This is leaking like a sieve; please fix me. - // FunctionInfos.InsertNode(FI, InsertPos); + FunctionInfos.InsertNode(FI, InsertPos); // Compute ABI information. getABIInfo().computeInfo(*FI, getContext()); diff --git a/lib/CodeGen/CGCall.h b/lib/CodeGen/CGCall.h index 562dfa9113..daf6f00045 100644 --- a/lib/CodeGen/CGCall.h +++ b/lib/CodeGen/CGCall.h @@ -84,6 +84,7 @@ namespace CodeGen { const ABIArgInfo &getReturnInfo() const { return Args[0].info; } void Profile(llvm::FoldingSetNodeID &ID) { + getReturnType().Profile(ID); for (arg_iterator it = arg_begin(), ie = arg_end(); it != ie; ++it) it->type.Profile(ID); } -- 2.50.1