1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

Refactor the setting of PrivateGlobalPrefix.

No functionality change.

llvm-svn: 196170
This commit is contained in:
Rafael Espindola 2013-12-02 23:39:26 +00:00
parent d2ccd34a64
commit 5f33387c40
14 changed files with 7 additions and 19 deletions

View File

@ -119,10 +119,10 @@ namespace llvm {
/// onto all global symbols. This is often used for '_'. /// onto all global symbols. This is often used for '_'.
char GlobalPrefix; // Defaults to '\0' char GlobalPrefix; // Defaults to '\0'
/// PrivateGlobalPrefix - This prefix is used for globals like constant /// This prefix is used for globals like constant pool entries that are
/// pool entries that are completely private to the .s file and should not /// completely private to the .s file and should not have names in the .o
/// have names in the .o file. This is often "." or "L". /// file.
const char *PrivateGlobalPrefix; // Defaults to "." const char *PrivateGlobalPrefix; // Defaults to "L"
/// LinkerPrivateGlobalPrefix - This prefix is used for symbols that should /// LinkerPrivateGlobalPrefix - This prefix is used for symbols that should
/// be passed through the assembler but be removed by the linker. This /// be passed through the assembler but be removed by the linker. This

View File

@ -42,7 +42,7 @@ MCAsmInfo::MCAsmInfo() {
LabelSuffix = ":"; LabelSuffix = ":";
DebugLabelSuffix = ":"; DebugLabelSuffix = ":";
GlobalPrefix = '\0'; GlobalPrefix = '\0';
PrivateGlobalPrefix = "."; PrivateGlobalPrefix = "L";
LinkerPrivateGlobalPrefix = ""; LinkerPrivateGlobalPrefix = "";
InlineAsmStart = "APP"; InlineAsmStart = "APP";
InlineAsmEnd = "NO_APP"; InlineAsmEnd = "NO_APP";

View File

@ -25,7 +25,6 @@ MCAsmInfoCOFF::MCAsmInfoCOFF() {
LCOMMDirectiveAlignmentType = LCOMM::ByteAlignment; LCOMMDirectiveAlignmentType = LCOMM::ByteAlignment;
HasDotTypeDotSizeDirective = false; HasDotTypeDotSizeDirective = false;
HasSingleParameterDotFile = false; HasSingleParameterDotFile = false;
PrivateGlobalPrefix = "L"; // Prefix for private global symbols
WeakRefDirective = "\t.weak\t"; WeakRefDirective = "\t.weak\t";
HasLinkOnceDirective = true; HasLinkOnceDirective = true;

View File

@ -24,7 +24,6 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() {
// Common settings for all Darwin targets. // Common settings for all Darwin targets.
// Syntax: // Syntax:
GlobalPrefix = '_'; GlobalPrefix = '_';
PrivateGlobalPrefix = "L";
LinkerPrivateGlobalPrefix = "l"; LinkerPrivateGlobalPrefix = "l";
HasSingleParameterDotFile = false; HasSingleParameterDotFile = false;
HasSubsectionsViaSymbols = true; HasSubsectionsViaSymbols = true;

View File

@ -20,4 +20,5 @@ void MCAsmInfoELF::anchor() { }
MCAsmInfoELF::MCAsmInfoELF() { MCAsmInfoELF::MCAsmInfoELF() {
HasIdentDirective = true; HasIdentDirective = true;
WeakRefDirective = "\t.weak\t"; WeakRefDirective = "\t.weak\t";
PrivateGlobalPrefix = ".L";
} }

View File

@ -22,7 +22,6 @@ AArch64ELFMCAsmInfo::AArch64ELFMCAsmInfo() {
AlignmentIsInBytes = false; AlignmentIsInBytes = false;
CommentString = "//"; CommentString = "//";
PrivateGlobalPrefix = ".L";
Code32Directive = ".code\t32"; Code32Directive = ".code\t32";
Data16bitsDirective = "\t.hword\t"; Data16bitsDirective = "\t.hword\t";

View File

@ -45,7 +45,6 @@ ARMELFMCAsmInfo::ARMELFMCAsmInfo() {
Data64bitsDirective = 0; Data64bitsDirective = 0;
CommentString = "@"; CommentString = "@";
PrivateGlobalPrefix = ".L";
Code16Directive = ".code\t16"; Code16Directive = ".code\t16";
Code32Directive = ".code\t32"; Code32Directive = ".code\t32";

View File

@ -26,7 +26,6 @@ HexagonMCAsmInfo::HexagonMCAsmInfo(StringRef TT) {
CommentString = "//"; CommentString = "//";
HasLEB128 = true; HasLEB128 = true;
PrivateGlobalPrefix = ".L";
LCOMMDirectiveAlignmentType = LCOMM::ByteAlignment; LCOMMDirectiveAlignmentType = LCOMM::ByteAlignment;
InlineAsmStart = "# InlineAsm Start"; InlineAsmStart = "# InlineAsm Start";
InlineAsmEnd = "# InlineAsm End"; InlineAsmEnd = "# InlineAsm End";

View File

@ -20,7 +20,6 @@ void MSP430MCAsmInfo::anchor() { }
MSP430MCAsmInfo::MSP430MCAsmInfo(StringRef TT) { MSP430MCAsmInfo::MSP430MCAsmInfo(StringRef TT) {
PointerSize = CalleeSaveStackSlotSize = 2; PointerSize = CalleeSaveStackSlotSize = 2;
PrivateGlobalPrefix = ".L";
CommentString = ";"; CommentString = ";";
AlignmentIsInBytes = false; AlignmentIsInBytes = false;

View File

@ -44,7 +44,6 @@ PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) {
AlignmentIsInBytes = false; AlignmentIsInBytes = false;
CommentString = "#"; CommentString = "#";
PrivateGlobalPrefix = ".L";
// Uses '.section' before '.bss' directive // Uses '.section' before '.bss' directive
UsesELFSectionDirectiveForBSS = true; UsesELFSectionDirectiveForBSS = true;

View File

@ -40,8 +40,6 @@ SparcELFMCAsmInfo::SparcELFMCAsmInfo(StringRef TT) {
SunStyleELFSectionSwitchSyntax = true; SunStyleELFSectionSwitchSyntax = true;
UsesELFSectionDirectiveForBSS = true; UsesELFSectionDirectiveForBSS = true;
PrivateGlobalPrefix = ".L";
} }

View File

@ -19,7 +19,6 @@ SystemZMCAsmInfo::SystemZMCAsmInfo(StringRef TT) {
IsLittleEndian = false; IsLittleEndian = false;
CommentString = "#"; CommentString = "#";
PrivateGlobalPrefix = ".L";
ZeroDirective = "\t.space\t"; ZeroDirective = "\t.space\t";
Data64bitsDirective = "\t.quad\t"; Data64bitsDirective = "\t.quad\t";
UsesELFSectionDirectiveForBSS = true; UsesELFSectionDirectiveForBSS = true;

View File

@ -89,8 +89,6 @@ X86ELFMCAsmInfo::X86ELFMCAsmInfo(const Triple &T) {
TextAlignFillValue = 0x90; TextAlignFillValue = 0x90;
PrivateGlobalPrefix = ".L";
// Set up DWARF directives // Set up DWARF directives
HasLEB128 = true; // Target asm supports leb128 directives (little-endian) HasLEB128 = true; // Target asm supports leb128 directives (little-endian)

View File

@ -20,8 +20,7 @@ XCoreMCAsmInfo::XCoreMCAsmInfo(StringRef TT) {
Data64bitsDirective = 0; Data64bitsDirective = 0;
ZeroDirective = "\t.space\t"; ZeroDirective = "\t.space\t";
CommentString = "#"; CommentString = "#";
PrivateGlobalPrefix = ".L";
AscizDirective = ".asciiz"; AscizDirective = ".asciiz";
HiddenVisibilityAttr = MCSA_Invalid; HiddenVisibilityAttr = MCSA_Invalid;