pass the mangler down into the various SectionForGlobal methods.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77432 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/TargetLoweringObjectFile.cpp b/lib/Target/TargetLoweringObjectFile.cpp
index bbcf53d..4f07f90 100644
--- a/lib/Target/TargetLoweringObjectFile.cpp
+++ b/lib/Target/TargetLoweringObjectFile.cpp
@@ -176,7 +176,8 @@
 /// the specified global variable or function definition.  This should not
 /// be passed external (or available externally) globals.
 const Section *TargetLoweringObjectFile::
-SectionForGlobal(const GlobalValue *GV, const TargetMachine &TM) const {
+SectionForGlobal(const GlobalValue *GV, Mangler *Mang,
+                 const TargetMachine &TM) const {
   assert(!GV->isDeclaration() && !GV->hasAvailableExternallyLinkage() &&
          "Can only be used for global definitions");
   
@@ -190,7 +191,7 @@
   if (GV->hasSection()) {
     // If the target has special section hacks for specifically named globals,
     // return them now.
-    if (const Section *TS = getSpecialCasedSectionGlobals(GV, Kind))
+    if (const Section *TS = getSpecialCasedSectionGlobals(GV, Mang, Kind))
       return TS;
     
     // If the target has magic semantics for certain section names, make sure to
@@ -203,13 +204,14 @@
 
   
   // Use default section depending on the 'type' of global
-  return SelectSectionForGlobal(GV, Kind, TM);
+  return SelectSectionForGlobal(GV, Kind, Mang, TM);
 }
 
 // Lame default implementation. Calculate the section name for global.
 const Section*
 TargetLoweringObjectFile::SelectSectionForGlobal(const GlobalValue *GV,
                                                  SectionKind Kind,
+                                                 Mangler *Mang,
                                                  const TargetMachine &TM) const{
   assert(!Kind.isThreadLocal() && "Doesn't support TLS");
   
@@ -399,7 +401,7 @@
 
 const Section *TargetLoweringObjectFileELF::
 SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
-                       const TargetMachine &TM) const {
+                       Mangler *Mang, const TargetMachine &TM) const {
   
   // If this global is linkonce/weak and the target handles this by emitting it
   // into a 'uniqued' section name, create and return the section now.
@@ -411,6 +413,7 @@
   }
   
   if (Kind.isText()) return TextSection;
+  
   if (Kind.isMergeableCString()) {
    assert(CStringSection_ && "Should have string section prefix");
     
@@ -510,10 +513,9 @@
                                        false, SectionKind::DataRel);
 }
 
-const Section *
-TargetLoweringObjectFileMachO::SelectSectionForGlobal(const GlobalValue *GV,
-                                                      SectionKind Kind,
-                                                const TargetMachine &TM) const {
+const Section *TargetLoweringObjectFileMachO::
+SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
+                       Mangler *Mang, const TargetMachine &TM) const {
   assert(!Kind.isThreadLocal() && "Darwin doesn't support TLS");
   
   if (Kind.isText())
@@ -616,7 +618,7 @@
 
 const Section *TargetLoweringObjectFileCOFF::
 SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
-                       const TargetMachine &TM) const {
+                       Mangler *Mang, const TargetMachine &TM) const {
   assert(!Kind.isThreadLocal() && "Doesn't support TLS");
   
   // If this global is linkonce/weak and the target handles this by emitting it