mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-05 17:39:16 +00:00
SymbolRewriter: Hide implementation details
NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231660 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c4ca7b59db
commit
b0c48577ca
@ -72,15 +72,15 @@
|
||||
#include "llvm/Transforms/Utils/SymbolRewriter.h"
|
||||
|
||||
using namespace llvm;
|
||||
using namespace SymbolRewriter;
|
||||
|
||||
static cl::list<std::string> 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 <RewriteDescriptor::Type DT, typename ValueType,
|
||||
ValueType *(llvm::Module::*Get)(StringRef) const>
|
||||
class ExplicitRewriteDescriptor : public RewriteDescriptor {
|
||||
@ -226,6 +227,7 @@ typedef PatternRewriteDescriptor<RewriteDescriptor::Type::NamedAlias,
|
||||
&llvm::Module::getNamedAlias,
|
||||
&llvm::Module::aliases>
|
||||
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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user