[llvm] r196170 - Refactor the setting of PrivateGlobalPrefix.
Rafael Espindola
rafael.espindola at gmail.com
Mon Dec 2 15:39:27 PST 2013
Author: rafael
Date: Mon Dec 2 17:39:26 2013
New Revision: 196170
URL: http://llvm.org/viewvc/llvm-project?rev=196170&view=rev
Log:
Refactor the setting of PrivateGlobalPrefix.
No functionality change.
Modified:
llvm/trunk/include/llvm/MC/MCAsmInfo.h
llvm/trunk/lib/MC/MCAsmInfo.cpp
llvm/trunk/lib/MC/MCAsmInfoCOFF.cpp
llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp
llvm/trunk/lib/MC/MCAsmInfoELF.cpp
llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp
llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp
llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp
llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp
Modified: llvm/trunk/include/llvm/MC/MCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAsmInfo.h?rev=196170&r1=196169&r2=196170&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCAsmInfo.h (original)
+++ llvm/trunk/include/llvm/MC/MCAsmInfo.h Mon Dec 2 17:39:26 2013
@@ -119,10 +119,10 @@ namespace llvm {
/// onto all global symbols. This is often used for '_'.
char GlobalPrefix; // Defaults to '\0'
- /// PrivateGlobalPrefix - This prefix is used for globals like constant
- /// pool entries that are completely private to the .s file and should not
- /// have names in the .o file. This is often "." or "L".
- const char *PrivateGlobalPrefix; // Defaults to "."
+ /// This prefix is used for globals like constant pool entries that are
+ /// completely private to the .s file and should not have names in the .o
+ /// file.
+ const char *PrivateGlobalPrefix; // Defaults to "L"
/// LinkerPrivateGlobalPrefix - This prefix is used for symbols that should
/// be passed through the assembler but be removed by the linker. This
Modified: llvm/trunk/lib/MC/MCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfo.cpp?rev=196170&r1=196169&r2=196170&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmInfo.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmInfo.cpp Mon Dec 2 17:39:26 2013
@@ -42,7 +42,7 @@ MCAsmInfo::MCAsmInfo() {
LabelSuffix = ":";
DebugLabelSuffix = ":";
GlobalPrefix = '\0';
- PrivateGlobalPrefix = ".";
+ PrivateGlobalPrefix = "L";
LinkerPrivateGlobalPrefix = "";
InlineAsmStart = "APP";
InlineAsmEnd = "NO_APP";
Modified: llvm/trunk/lib/MC/MCAsmInfoCOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfoCOFF.cpp?rev=196170&r1=196169&r2=196170&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmInfoCOFF.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmInfoCOFF.cpp Mon Dec 2 17:39:26 2013
@@ -25,7 +25,6 @@ MCAsmInfoCOFF::MCAsmInfoCOFF() {
LCOMMDirectiveAlignmentType = LCOMM::ByteAlignment;
HasDotTypeDotSizeDirective = false;
HasSingleParameterDotFile = false;
- PrivateGlobalPrefix = "L"; // Prefix for private global symbols
WeakRefDirective = "\t.weak\t";
HasLinkOnceDirective = true;
Modified: llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp?rev=196170&r1=196169&r2=196170&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp Mon Dec 2 17:39:26 2013
@@ -24,7 +24,6 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() {
// Common settings for all Darwin targets.
// Syntax:
GlobalPrefix = '_';
- PrivateGlobalPrefix = "L";
LinkerPrivateGlobalPrefix = "l";
HasSingleParameterDotFile = false;
HasSubsectionsViaSymbols = true;
Modified: llvm/trunk/lib/MC/MCAsmInfoELF.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfoELF.cpp?rev=196170&r1=196169&r2=196170&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmInfoELF.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmInfoELF.cpp Mon Dec 2 17:39:26 2013
@@ -20,4 +20,5 @@ void MCAsmInfoELF::anchor() { }
MCAsmInfoELF::MCAsmInfoELF() {
HasIdentDirective = true;
WeakRefDirective = "\t.weak\t";
+ PrivateGlobalPrefix = ".L";
}
Modified: llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp?rev=196170&r1=196169&r2=196170&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp Mon Dec 2 17:39:26 2013
@@ -22,7 +22,6 @@ AArch64ELFMCAsmInfo::AArch64ELFMCAsmInfo
AlignmentIsInBytes = false;
CommentString = "//";
- PrivateGlobalPrefix = ".L";
Code32Directive = ".code\t32";
Data16bitsDirective = "\t.hword\t";
Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp?rev=196170&r1=196169&r2=196170&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp Mon Dec 2 17:39:26 2013
@@ -45,7 +45,6 @@ ARMELFMCAsmInfo::ARMELFMCAsmInfo() {
Data64bitsDirective = 0;
CommentString = "@";
- PrivateGlobalPrefix = ".L";
Code16Directive = ".code\t16";
Code32Directive = ".code\t32";
Modified: llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp?rev=196170&r1=196169&r2=196170&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp Mon Dec 2 17:39:26 2013
@@ -26,7 +26,6 @@ HexagonMCAsmInfo::HexagonMCAsmInfo(Strin
CommentString = "//";
HasLEB128 = true;
- PrivateGlobalPrefix = ".L";
LCOMMDirectiveAlignmentType = LCOMM::ByteAlignment;
InlineAsmStart = "# InlineAsm Start";
InlineAsmEnd = "# InlineAsm End";
Modified: llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp?rev=196170&r1=196169&r2=196170&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp Mon Dec 2 17:39:26 2013
@@ -20,7 +20,6 @@ void MSP430MCAsmInfo::anchor() { }
MSP430MCAsmInfo::MSP430MCAsmInfo(StringRef TT) {
PointerSize = CalleeSaveStackSlotSize = 2;
- PrivateGlobalPrefix = ".L";
CommentString = ";";
AlignmentIsInBytes = false;
Modified: llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp?rev=196170&r1=196169&r2=196170&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp Mon Dec 2 17:39:26 2013
@@ -44,7 +44,6 @@ PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(boo
AlignmentIsInBytes = false;
CommentString = "#";
- PrivateGlobalPrefix = ".L";
// Uses '.section' before '.bss' directive
UsesELFSectionDirectiveForBSS = true;
Modified: llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp?rev=196170&r1=196169&r2=196170&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp Mon Dec 2 17:39:26 2013
@@ -40,8 +40,6 @@ SparcELFMCAsmInfo::SparcELFMCAsmInfo(Str
SunStyleELFSectionSwitchSyntax = true;
UsesELFSectionDirectiveForBSS = true;
-
- PrivateGlobalPrefix = ".L";
}
Modified: llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp?rev=196170&r1=196169&r2=196170&view=diff
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp Mon Dec 2 17:39:26 2013
@@ -19,7 +19,6 @@ SystemZMCAsmInfo::SystemZMCAsmInfo(Strin
IsLittleEndian = false;
CommentString = "#";
- PrivateGlobalPrefix = ".L";
ZeroDirective = "\t.space\t";
Data64bitsDirective = "\t.quad\t";
UsesELFSectionDirectiveForBSS = true;
Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp?rev=196170&r1=196169&r2=196170&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp Mon Dec 2 17:39:26 2013
@@ -89,8 +89,6 @@ X86ELFMCAsmInfo::X86ELFMCAsmInfo(const T
TextAlignFillValue = 0x90;
- PrivateGlobalPrefix = ".L";
-
// Set up DWARF directives
HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
Modified: llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp?rev=196170&r1=196169&r2=196170&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp Mon Dec 2 17:39:26 2013
@@ -20,8 +20,7 @@ XCoreMCAsmInfo::XCoreMCAsmInfo(StringRef
Data64bitsDirective = 0;
ZeroDirective = "\t.space\t";
CommentString = "#";
-
- PrivateGlobalPrefix = ".L";
+
AscizDirective = ".asciiz";
HiddenVisibilityAttr = MCSA_Invalid;
More information about the llvm-commits
mailing list