Refactor the setting of PrivateGlobalPrefix.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 2 Dec 2013 23:39:26 +0000 (23:39 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 2 Dec 2013 23:39:26 +0000 (23:39 +0000)
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196170 91177308-0d34-0410-b5e6-96231b3b80d8

14 files changed:
include/llvm/MC/MCAsmInfo.h
lib/MC/MCAsmInfo.cpp
lib/MC/MCAsmInfoCOFF.cpp
lib/MC/MCAsmInfoDarwin.cpp
lib/MC/MCAsmInfoELF.cpp
lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp
lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp
lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp
lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp

index c3316ce397eeffcd26c5960aacb82f4b9114bee1..8672b8dacfd9dc18c3797cf5cce60956055b5d01 100644 (file)
@@ -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
index 53c28c201b9d737121852578db60b632483b971f..16506fe89e6bf4c5d9b24e6aa735088c85f3c4ee 100644 (file)
@@ -42,7 +42,7 @@ MCAsmInfo::MCAsmInfo() {
   LabelSuffix = ":";
   DebugLabelSuffix = ":";
   GlobalPrefix = '\0';
-  PrivateGlobalPrefix = ".";
+  PrivateGlobalPrefix = "L";
   LinkerPrivateGlobalPrefix = "";
   InlineAsmStart = "APP";
   InlineAsmEnd = "NO_APP";
index b630292e2888e1c5afbb273e47ba108cfba47428..a9d98ecac82700e6510e91e903607f6177dffdee 100644 (file)
@@ -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;
 
index d1540bb4eb112ea8d2e04765146ad7c365e969f8..612ca87f36ecce26751924123563eccdf880f931 100644 (file)
@@ -24,7 +24,6 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() {
   // Common settings for all Darwin targets.
   // Syntax:
   GlobalPrefix = '_';
-  PrivateGlobalPrefix = "L";
   LinkerPrivateGlobalPrefix = "l";
   HasSingleParameterDotFile = false;
   HasSubsectionsViaSymbols = true;
index 8cf4e4fea2337cd074b0796b2a34fc75655e7767..ccb3dc3c6edadb80c939e62d72f5f372078bc617 100644 (file)
@@ -20,4 +20,5 @@ void MCAsmInfoELF::anchor() { }
 MCAsmInfoELF::MCAsmInfoELF() {
   HasIdentDirective = true;
   WeakRefDirective = "\t.weak\t";
+  PrivateGlobalPrefix = ".L";
 }
index add874c12019052c2125201c70e89da49cd1ae24..e9747d686688817fdca4fd8e379fc5b821b88e94 100644 (file)
@@ -22,7 +22,6 @@ AArch64ELFMCAsmInfo::AArch64ELFMCAsmInfo() {
   AlignmentIsInBytes = false;
 
   CommentString = "//";
-  PrivateGlobalPrefix = ".L";
   Code32Directive = ".code\t32";
 
   Data16bitsDirective = "\t.hword\t";
index ad796e660e96d7816938e1d8d4314194db3ef369..714142123d94907c78e300fa20f77d4bf3ff715a 100644 (file)
@@ -45,7 +45,6 @@ ARMELFMCAsmInfo::ARMELFMCAsmInfo() {
 
   Data64bitsDirective = 0;
   CommentString = "@";
-  PrivateGlobalPrefix = ".L";
   Code16Directive = ".code\t16";
   Code32Directive = ".code\t32";
 
index 3f9415b94df9be900470a6f7cf720fbbbfcbd5f8..f1a65c3f5063761edcc8086f73bc1754cea12073 100644 (file)
@@ -26,7 +26,6 @@ HexagonMCAsmInfo::HexagonMCAsmInfo(StringRef TT) {
   CommentString = "//";
   HasLEB128 = true;
 
-  PrivateGlobalPrefix = ".L";
   LCOMMDirectiveAlignmentType = LCOMM::ByteAlignment;
   InlineAsmStart = "# InlineAsm Start";
   InlineAsmEnd = "# InlineAsm End";
index acf2ab869d599f9d11710e869ab612240ffe19b2..df1aa1a41f19ef33c4e3645e92ca2635f50e58d6 100644 (file)
@@ -20,7 +20,6 @@ void MSP430MCAsmInfo::anchor() { }
 MSP430MCAsmInfo::MSP430MCAsmInfo(StringRef TT) {
   PointerSize = CalleeSaveStackSlotSize = 2;
 
-  PrivateGlobalPrefix = ".L";
   CommentString = ";";
 
   AlignmentIsInBytes = false;
index 9d0f414f61b25cd955013b5fc3fc7e5851ebed0e..a0b20ed792bca6d668f0c0cfaf5a8a08fdb7b1c8 100644 (file)
@@ -44,7 +44,6 @@ PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) {
   AlignmentIsInBytes = false;
 
   CommentString = "#";
-  PrivateGlobalPrefix = ".L";
 
   // Uses '.section' before '.bss' directive
   UsesELFSectionDirectiveForBSS = true;  
index baac36b1db64cbe217c7f5540f89a5c2b72a68fd..e3f957fc4b2e9d4b8490efde68ed79e2356c1702 100644 (file)
@@ -40,8 +40,6 @@ SparcELFMCAsmInfo::SparcELFMCAsmInfo(StringRef TT) {
 
   SunStyleELFSectionSwitchSyntax = true;
   UsesELFSectionDirectiveForBSS = true;
-
-  PrivateGlobalPrefix = ".L";
 }
 
 
index d7313c1684e29c98b7a774971b521b883fbb71d7..c46a36bdd23dfc9e5a726581015355f1bc0e9f33 100644 (file)
@@ -19,7 +19,6 @@ SystemZMCAsmInfo::SystemZMCAsmInfo(StringRef TT) {
   IsLittleEndian = false;
 
   CommentString = "#";
-  PrivateGlobalPrefix = ".L";
   ZeroDirective = "\t.space\t";
   Data64bitsDirective = "\t.quad\t";
   UsesELFSectionDirectiveForBSS = true;
index 45f22a1366e36999b4fbc60b158b5318fef057aa..9304decce723c1deece38426bd68241a9250b0db 100644 (file)
@@ -89,8 +89,6 @@ X86ELFMCAsmInfo::X86ELFMCAsmInfo(const Triple &T) {
 
   TextAlignFillValue = 0x90;
 
-  PrivateGlobalPrefix = ".L";
-
   // Set up DWARF directives
   HasLEB128 = true;  // Target asm supports leb128 directives (little-endian)
 
index 3d1c4745d6ac8caef72c669b8e1beacbeed9e7f0..f788c5957bb8437c08b974232169a5d0a9bec95d 100644 (file)
@@ -20,8 +20,7 @@ XCoreMCAsmInfo::XCoreMCAsmInfo(StringRef TT) {
   Data64bitsDirective = 0;
   ZeroDirective = "\t.space\t";
   CommentString = "#";
-    
-  PrivateGlobalPrefix = ".L";
+
   AscizDirective = ".asciiz";
 
   HiddenVisibilityAttr = MCSA_Invalid;