mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
* PIC codegen for X86/Linux has been implemented
* PIC-aware internal structures in X86 Codegen have been refactored * Visibility (default/weak) has been added * Docs fixes (external weak linkage, visibility, formatting) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33136 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -858,8 +858,7 @@ void AssemblyWriter::printGlobal(const GlobalVariable *GV) {
|
||||
case GlobalValue::DLLImportLinkage: Out << "dllimport "; break;
|
||||
case GlobalValue::ExternalWeakLinkage: Out << "extern_weak "; break;
|
||||
default: Out << "external "; break;
|
||||
}
|
||||
else
|
||||
} else {
|
||||
switch (GV->getLinkage()) {
|
||||
case GlobalValue::InternalLinkage: Out << "internal "; break;
|
||||
case GlobalValue::LinkOnceLinkage: Out << "linkonce "; break;
|
||||
@@ -873,7 +872,15 @@ void AssemblyWriter::printGlobal(const GlobalVariable *GV) {
|
||||
cerr << "GhostLinkage not allowed in AsmWriter!\n";
|
||||
abort();
|
||||
}
|
||||
|
||||
switch (GV->getVisibility()) {
|
||||
case GlobalValue::DefaultVisibility: break;
|
||||
case GlobalValue::HiddenVisibility: Out << "hidden "; break;
|
||||
default:
|
||||
cerr << "Invalid visibility style!\n";
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
Out << (GV->isConstant() ? "constant " : "global ");
|
||||
printType(GV->getType()->getElementType());
|
||||
|
||||
@@ -974,6 +981,13 @@ void AssemblyWriter::printFunction(const Function *F) {
|
||||
cerr << "GhostLinkage not allowed in AsmWriter!\n";
|
||||
abort();
|
||||
}
|
||||
switch (F->getVisibility()) {
|
||||
case GlobalValue::DefaultVisibility: break;
|
||||
case GlobalValue::HiddenVisibility: Out << "hidden "; break;
|
||||
default:
|
||||
cerr << "Invalid visibility style!\n";
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
// Print the calling convention.
|
||||
|
Reference in New Issue
Block a user