From b0c48577cac89863dfd48c09b5a15dd859578afd Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Mon, 9 Mar 2015 15:50:47 +0000 Subject: [PATCH] SymbolRewriter: Hide implementation details NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231660 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/SymbolRewriter.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Transforms/Utils/SymbolRewriter.cpp b/lib/Transforms/Utils/SymbolRewriter.cpp index b343cc4d50c..5c71b78162a 100644 --- a/lib/Transforms/Utils/SymbolRewriter.cpp +++ b/lib/Transforms/Utils/SymbolRewriter.cpp @@ -72,15 +72,15 @@ #include "llvm/Transforms/Utils/SymbolRewriter.h" using namespace llvm; +using namespace SymbolRewriter; static cl::list RewriteMapFiles("rewrite-map-file", cl::desc("Symbol Rewrite Map"), cl::value_desc("filename")); -namespace llvm { -namespace SymbolRewriter { -void rewriteComdat(Module &M, GlobalObject *GO, const std::string &Source, - const std::string &Target) { +static void rewriteComdat(Module &M, GlobalObject *GO, + const std::string &Source, + const std::string &Target) { if (Comdat *CD = GO->getComdat()) { auto &Comdats = M.getComdatSymbolTable(); @@ -92,6 +92,7 @@ void rewriteComdat(Module &M, GlobalObject *GO, const std::string &Source, } } +namespace { template class ExplicitRewriteDescriptor : public RewriteDescriptor { @@ -226,6 +227,7 @@ typedef PatternRewriteDescriptor PatternRewriteNamedAliasDescriptor; +} // namespace bool RewriteMapParser::parse(const std::string &MapFile, RewriteDescriptorList *DL) { @@ -489,8 +491,6 @@ parseRewriteGlobalAliasDescriptor(yaml::Stream &YS, yaml::ScalarNode *K, return true; } -} -} namespace { class RewriteSymbols : public ModulePass {