]> granicus.if.org Git - llvm/commitdiff
BitcodeWriter: Simplify. NFC.
authorPeter Collingbourne <peter@pcc.me.uk>
Fri, 6 May 2016 02:41:23 +0000 (02:41 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Fri, 6 May 2016 02:41:23 +0000 (02:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268707 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Bitcode/Writer/BitcodeWriter.cpp

index 9fb5d66a5ac77bc5ebd2d923c186cbbd968f20c4..82e2cab60569a7e1f544de8a9affe198b678544a 100644 (file)
@@ -3121,10 +3121,8 @@ void ModuleBitcodeWriter::writePerModuleGlobalValueSummary() {
       report_fatal_error("Unexpected anonymous function when writing summary");
 
     auto *Summary = Index->getGlobalValueSummary(F);
-    writePerModuleFunctionSummaryRecord(
-        NameVals, Summary,
-        VE.getValueID(M.getValueSymbolTable().lookup(F.getName())),
-        FSCallsAbbrev, FSCallsProfileAbbrev, F);
+    writePerModuleFunctionSummaryRecord(NameVals, Summary, VE.getValueID(&F),
+                                        FSCallsAbbrev, FSCallsProfileAbbrev, F);
   }
 
   // Capture references from GlobalVariable initializers, which are outside