[llvm] bfa3f0c - Hide implementation details in anonymous namespaces. NFC.

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 24 01:49:05 PDT 2019


Author: Benjamin Kramer
Date: 2019-10-24T10:48:43+02:00
New Revision: bfa3f0c316655d0140abb4e90f82242a7c2b4ea4

URL: https://github.com/llvm/llvm-project/commit/bfa3f0c316655d0140abb4e90f82242a7c2b4ea4
DIFF: https://github.com/llvm/llvm-project/commit/bfa3f0c316655d0140abb4e90f82242a7c2b4ea4.diff

LOG: Hide implementation details in anonymous namespaces. NFC.

Added: 
    

Modified: 
    llvm/lib/DebugInfo/CodeView/SymbolRecordHelpers.cpp
    llvm/lib/LTO/ThinLTOCodeGenerator.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/DebugInfo/CodeView/SymbolRecordHelpers.cpp b/llvm/lib/DebugInfo/CodeView/SymbolRecordHelpers.cpp
index 51a5a9e9243e..2562c633bb99 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 <typename RecordT> RecordT createRecord(const CVSymbol &sym) {
+template <typename RecordT> static RecordT createRecord(const CVSymbol &sym) {
   RecordT record(static_cast<SymbolRecordKind>(sym.kind()));
   cantFail(SymbolDeserializer::deserializeAs<RecordT>(sym, record));
   return record;

diff  --git a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
index d151de17896f..5b27cdbfef3f 100644
--- a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
@@ -580,6 +580,7 @@ std::unique_ptr<ModuleSummaryIndex> ThinLTOCodeGenerator::linkCombinedIndex() {
   return CombinedIndex;
 }
 
+namespace {
 struct IsExported {
   const StringMap<FunctionImporter::ExportSetTy> &ExportLists;
   const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols;
@@ -610,6 +611,7 @@ struct IsPrevailing {
     return Prevailing->second == S;
   };
 };
+}; // namespace
 
 static void computeDeadSymbolsInIndex(
     ModuleSummaryIndex &Index,


        


More information about the llvm-commits mailing list