PR21875: codegen for non-type template parameters of nullptr_t type
[oota-llvm.git] / lib / CodeGen / GCMetadata.cpp
index 5b03d6bb5db86f7bb3e91e29c05a4c1531b29445..6101c679a5d33655bb5f00c21a1ef0779a958d51 100644 (file)
@@ -91,12 +91,14 @@ GCFunctionInfo &GCModuleInfo::getFunctionInfo(const Function &F) {
     return *I->second;
   
   GCStrategy *S = getOrCreateStrategy(F.getParent(), F.getGC());
-  GCFunctionInfo *GFI = S->insertFunctionInfo(F);
+  Functions.push_back(make_unique<GCFunctionInfo>(F, *S));
+  GCFunctionInfo *GFI = Functions.back().get();
   FInfoMap[&F] = GFI;
   return *GFI;
 }
 
 void GCModuleInfo::clear() {
+  Functions.clear();
   FInfoMap.clear();
   StrategyMap.clear();
   StrategyList.clear();