mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
Rename member variable to try to fix the bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207915 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -135,7 +135,7 @@ private:
|
|||||||
typedef StringMap<uint8_t> StringSet;
|
typedef StringMap<uint8_t> StringSet;
|
||||||
|
|
||||||
LLVMContext &Context;
|
LLVMContext &Context;
|
||||||
Linker Linker;
|
Linker IRLinker;
|
||||||
TargetMachine *TargetMach;
|
TargetMachine *TargetMach;
|
||||||
bool EmitDwarfDebugInfo;
|
bool EmitDwarfDebugInfo;
|
||||||
bool ScopeRestrictionsDone;
|
bool ScopeRestrictionsDone;
|
||||||
|
@ -63,7 +63,7 @@ const char* LTOCodeGenerator::getVersionString() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LTOCodeGenerator::LTOCodeGenerator()
|
LTOCodeGenerator::LTOCodeGenerator()
|
||||||
: Context(getGlobalContext()), Linker(new Module("ld-temp.o", Context)),
|
: Context(getGlobalContext()), IRLinker(new Module("ld-temp.o", Context)),
|
||||||
TargetMach(nullptr), EmitDwarfDebugInfo(false),
|
TargetMach(nullptr), EmitDwarfDebugInfo(false),
|
||||||
ScopeRestrictionsDone(false), CodeModel(LTO_CODEGEN_PIC_MODEL_DEFAULT),
|
ScopeRestrictionsDone(false), CodeModel(LTO_CODEGEN_PIC_MODEL_DEFAULT),
|
||||||
NativeObjectFile(nullptr), DiagHandler(nullptr), DiagContext(nullptr) {
|
NativeObjectFile(nullptr), DiagHandler(nullptr), DiagContext(nullptr) {
|
||||||
@ -76,7 +76,7 @@ LTOCodeGenerator::~LTOCodeGenerator() {
|
|||||||
TargetMach = nullptr;
|
TargetMach = nullptr;
|
||||||
NativeObjectFile = nullptr;
|
NativeObjectFile = nullptr;
|
||||||
|
|
||||||
Linker.deleteModule();
|
IRLinker.deleteModule();
|
||||||
|
|
||||||
for (std::vector<char *>::iterator I = CodegenOptions.begin(),
|
for (std::vector<char *>::iterator I = CodegenOptions.begin(),
|
||||||
E = CodegenOptions.end();
|
E = CodegenOptions.end();
|
||||||
@ -114,7 +114,7 @@ void LTOCodeGenerator::initializeLTOPasses() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool LTOCodeGenerator::addModule(LTOModule* mod, std::string& errMsg) {
|
bool LTOCodeGenerator::addModule(LTOModule* mod, std::string& errMsg) {
|
||||||
bool ret = Linker.linkInModule(mod->getLLVVMModule(), &errMsg);
|
bool ret = IRLinker.linkInModule(mod->getLLVVMModule(), &errMsg);
|
||||||
|
|
||||||
const std::vector<const char*> &undefs = mod->getAsmUndefinedRefs();
|
const std::vector<const char*> &undefs = mod->getAsmUndefinedRefs();
|
||||||
for (int i = 0, e = undefs.size(); i != e; ++i)
|
for (int i = 0, e = undefs.size(); i != e; ++i)
|
||||||
@ -186,7 +186,7 @@ bool LTOCodeGenerator::writeMergedModules(const char *path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// write bitcode to it
|
// write bitcode to it
|
||||||
WriteBitcodeToFile(Linker.getModule(), Out.os());
|
WriteBitcodeToFile(IRLinker.getModule(), Out.os());
|
||||||
Out.os().close();
|
Out.os().close();
|
||||||
|
|
||||||
if (Out.os().has_error()) {
|
if (Out.os().has_error()) {
|
||||||
@ -273,7 +273,7 @@ bool LTOCodeGenerator::determineTarget(std::string &errMsg) {
|
|||||||
if (TargetMach)
|
if (TargetMach)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
std::string TripleStr = Linker.getModule()->getTargetTriple();
|
std::string TripleStr = IRLinker.getModule()->getTargetTriple();
|
||||||
if (TripleStr.empty())
|
if (TripleStr.empty())
|
||||||
TripleStr = sys::getDefaultTargetTriple();
|
TripleStr = sys::getDefaultTargetTriple();
|
||||||
llvm::Triple Triple(TripleStr);
|
llvm::Triple Triple(TripleStr);
|
||||||
@ -395,7 +395,7 @@ static void accumulateAndSortLibcalls(std::vector<StringRef> &Libcalls,
|
|||||||
void LTOCodeGenerator::applyScopeRestrictions() {
|
void LTOCodeGenerator::applyScopeRestrictions() {
|
||||||
if (ScopeRestrictionsDone)
|
if (ScopeRestrictionsDone)
|
||||||
return;
|
return;
|
||||||
Module *mergedModule = Linker.getModule();
|
Module *mergedModule = IRLinker.getModule();
|
||||||
|
|
||||||
// Start off with a verification pass.
|
// Start off with a verification pass.
|
||||||
PassManager passes;
|
PassManager passes;
|
||||||
@ -463,7 +463,7 @@ bool LTOCodeGenerator::generateObjectFile(raw_ostream &out,
|
|||||||
if (!this->determineTarget(errMsg))
|
if (!this->determineTarget(errMsg))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Module *mergedModule = Linker.getModule();
|
Module *mergedModule = IRLinker.getModule();
|
||||||
|
|
||||||
// Mark which symbols can not be internalized
|
// Mark which symbols can not be internalized
|
||||||
this->applyScopeRestrictions();
|
this->applyScopeRestrictions();
|
||||||
|
Reference in New Issue
Block a user