diff --git a/llvm/lib/DebugInfo/CodeView/SymbolRecordHelpers.cpp b/llvm/lib/DebugInfo/CodeView/SymbolRecordHelpers.cpp index 51a5a9e9243eae..2562c633bb99e6 100644 --- a/llvm/lib/DebugInfo/CodeView/SymbolRecordHelpers.cpp +++ b/llvm/lib/DebugInfo/CodeView/SymbolRecordHelpers.cpp @@ -14,7 +14,7 @@ using namespace llvm; using namespace llvm::codeview; -template RecordT createRecord(const CVSymbol &sym) { +template static RecordT createRecord(const CVSymbol &sym) { RecordT record(static_cast(sym.kind())); cantFail(SymbolDeserializer::deserializeAs(sym, record)); return record; diff --git a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp index d151de17896f65..5b27cdbfef3fe8 100644 --- a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp +++ b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp @@ -580,6 +580,7 @@ std::unique_ptr ThinLTOCodeGenerator::linkCombinedIndex() { return CombinedIndex; } +namespace { struct IsExported { const StringMap &ExportLists; const DenseSet &GUIDPreservedSymbols; @@ -610,6 +611,7 @@ struct IsPrevailing { return Prevailing->second == S; }; }; +}; // namespace static void computeDeadSymbolsInIndex( ModuleSummaryIndex &Index,