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
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index a3dd877..61c6653 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -101,9 +101,7 @@
// 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 562dfa9..daf6f00 100644
--- a/lib/CodeGen/CGCall.h
+++ b/lib/CodeGen/CGCall.h
@@ -84,6 +84,7 @@
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);
}