summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 9fb5d66a5ac..82e2cab6056 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -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
OpenPOWER on IntegriCloud