<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 27, 2014 at 4:49 PM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: echristo<br>
Date: Mon Jan 27 18:49:26 2014<br>
New Revision: 200269<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=200269&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=200269&view=rev</a><br>
Log:<br>
Revert r199871 and replace it with a simple check in the debug info<br>
code to see if we're emitting a function into a non-default<br>
text section. This is still a less-than-ideal solution, but more<br>
contained than r199871 to determine whether or not we're emitting<br>
code into an array of comdat sections.<br></blockquote><div><br></div><div>Sounds good (well, agree that it's not quite ideal). Might've been easier to follow this if you'd done the revert separately.<br><br>
Also, as came up at lunch, I assume this is wrong for LTO (we'll describe every CU as having a range of the entire text section).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Modified:<br>
    llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h<br>
    llvm/trunk/include/llvm/Target/TargetLoweringObjectFile.h<br>
    llvm/trunk/include/llvm/Target/TargetMachine.h<br>
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h<br>
    llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp<br>
    llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.cpp<br>
    llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.h<br>
    llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp<br>
    llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h<br>
    llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.cpp<br>
    llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.h<br>
    llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp<br>
    llvm/trunk/lib/Target/TargetMachine.cpp<br>
    llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.cpp<br>
    llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.h<br>
<br>
Modified: llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h?rev=200269&r1=200268&r2=200269&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h?rev=200269&r1=200268&r2=200269&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h (original)<br>
+++ llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h Mon Jan 27 18:49:26 2014<br>
@@ -53,7 +53,7 @@ public:<br>
<br>
   virtual const MCSection *<br>
   SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,<br>
-                         Mangler *Mang, TargetMachine &TM) const;<br>
+                         Mangler *Mang, const TargetMachine &TM) const;<br>
<br>
   /// getTTypeGlobalReference - Return an MCExpr to use for a reference to the<br>
   /// specified type info global variable from exception handling information.<br>
@@ -92,7 +92,7 @@ public:<br>
<br>
   virtual const MCSection *<br>
   SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,<br>
-                         Mangler *Mang, TargetMachine &TM) const;<br>
+                         Mangler *Mang, const TargetMachine &TM) const;<br>
<br>
   virtual const MCSection *<br>
   getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,<br>
@@ -131,7 +131,7 @@ public:<br>
<br>
   virtual const MCSection *<br>
   SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,<br>
-                         Mangler *Mang, TargetMachine &TM) const;<br>
+                         Mangler *Mang, const TargetMachine &TM) const;<br>
<br>
   /// getDepLibFromLinkerOpt - Extract the dependent library name from a linker<br>
   /// option string. Returns StringRef() if the option does not specify a library.<br>
<br>
Modified: llvm/trunk/include/llvm/Target/TargetLoweringObjectFile.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLoweringObjectFile.h?rev=200269&r1=200268&r2=200269&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLoweringObjectFile.h?rev=200269&r1=200268&r2=200269&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/include/llvm/Target/TargetLoweringObjectFile.h (original)<br>
+++ llvm/trunk/include/llvm/Target/TargetLoweringObjectFile.h Mon Jan 27 18:49:26 2014<br>
@@ -38,7 +38,7 @@ class TargetLoweringObjectFile : public<br>
   const DataLayout *DL;<br>
<br>
   TargetLoweringObjectFile(<br>
-      const TargetLoweringObjectFile &) LLVM_DELETED_FUNCTION;<br>
+    const TargetLoweringObjectFile&) LLVM_DELETED_FUNCTION;<br>
   void operator=(const TargetLoweringObjectFile&) LLVM_DELETED_FUNCTION;<br>
<br>
 public:<br>
@@ -91,14 +91,14 @@ public:<br>
   /// be passed external (or available externally) globals.<br>
   const MCSection *SectionForGlobal(const GlobalValue *GV,<br>
                                     SectionKind Kind, Mangler *Mang,<br>
-                                    TargetMachine &TM) const;<br>
+                                    const TargetMachine &TM) const;<br>
<br>
   /// SectionForGlobal - This method computes the appropriate section to emit<br>
   /// the specified global variable or function definition.  This should not<br>
   /// be passed external (or available externally) globals.<br>
   const MCSection *SectionForGlobal(const GlobalValue *GV,<br>
                                     Mangler *Mang,<br>
-                                    TargetMachine &TM) const {<br>
+                                    const TargetMachine &TM) const {<br>
     return SectionForGlobal(GV, getKindForGlobal(GV, TM), Mang, TM);<br>
   }<br>
<br>
@@ -167,7 +167,7 @@ public:<br>
 protected:<br>
   virtual const MCSection *<br>
   SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,<br>
-                         Mangler *Mang, TargetMachine &TM) const;<br>
+                         Mangler *Mang, const TargetMachine &TM) const;<br>
 };<br>
<br>
 } // end namespace llvm<br>
<br>
Modified: llvm/trunk/include/llvm/Target/TargetMachine.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachine.h?rev=200269&r1=200268&r2=200269&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachine.h?rev=200269&r1=200268&r2=200269&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/include/llvm/Target/TargetMachine.h (original)<br>
+++ llvm/trunk/include/llvm/Target/TargetMachine.h Mon Jan 27 18:49:26 2014<br>
@@ -88,7 +88,6 @@ protected: // Can only create subclasses<br>
   unsigned MCUseLoc : 1;<br>
   unsigned MCUseCFI : 1;<br>
   unsigned MCUseDwarfDirectory : 1;<br>
-  unsigned DebugUseUniqueSections : 1;<br>
   unsigned RequireStructuredCFG : 1;<br>
<br>
 public:<br>
@@ -161,9 +160,6 @@ public:<br>
   bool requiresStructuredCFG() const { return RequireStructuredCFG; }<br>
   void setRequiresStructuredCFG(bool Value) { RequireStructuredCFG = Value; }<br>
<br>
-  bool debugUseUniqueSections() const { return DebugUseUniqueSections; }<br>
-  void setDebugUseUniqueSections(bool Value) { DebugUseUniqueSections = Value; }<br>
-<br>
   /// hasMCRelaxAll - Check whether all machine code instructions should be<br>
   /// relaxed.<br>
   bool hasMCRelaxAll() const { return MCRelaxAll; }<br>
<br>
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=200269&r1=200268&r2=200269&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=200269&r1=200268&r2=200269&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Jan 27 18:49:26 2014<br>
@@ -176,6 +176,7 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Mo<br>
     : Asm(A), MMI(Asm->MMI), FirstCU(0), SourceIdMap(DIEValueAllocator),<br>
       PrevLabel(NULL), GlobalRangeCount(0),<br>
       InfoHolder(A, "info_string", DIEValueAllocator), HasCURanges(false),<br>
+      UsedNonDefaultText(false),<br>
       SkeletonHolder(A, "skel_string", DIEValueAllocator) {<br>
<br>
   DwarfInfoSectionSym = DwarfAbbrevSectionSym = DwarfStrSectionSym = 0;<br>
@@ -1123,7 +1124,7 @@ void DwarfDebug::endSections() {<br>
   // we have -ffunction-sections enabled, or we've emitted a function<br>
   // into a unique section. At this point all sections should be finalized<br>
   // except for dwarf sections.<br>
-  HasCURanges = DwarfCURanges || Asm->TM.debugUseUniqueSections() ||<br>
+  HasCURanges = DwarfCURanges || UsedNonDefaultText ||<br>
                 TargetMachine::getFunctionSections();<br>
 }<br>
<br>
@@ -1580,6 +1581,12 @@ void DwarfDebug::beginFunction(const Mac<br>
   else<br>
     Asm->OutStreamer.getContext().setDwarfCompileUnitID(TheCU->getUniqueID());<br>
<br>
+  // Check the current section against the standard text section. If different<br>
+  // keep track so that we will know when we're emitting functions into multiple<br>
+  // sections.<br>
+  if (Asm->getObjFileLowering().getTextSection() != Asm->getCurrentSection())<br>
+    UsedNonDefaultText = true;<br>
+<br>
   // Emit a label for the function so that we have a beginning address.<br>
   FunctionBeginSym = Asm->GetTempSymbol("func_begin", Asm->getFunctionNumber());<br>
   // Assumes in correct section after the entry point.<br>
<br>
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=200269&r1=200268&r2=200269&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=200269&r1=200268&r2=200269&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h (original)<br>
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h Mon Jan 27 18:49:26 2014<br>
@@ -461,6 +461,10 @@ class DwarfDebug : public AsmPrinterHand<br>
   // Whether or not to use AT_ranges for compilation units.<br>
   bool HasCURanges;<br>
<br>
+  // Whether we emitted a function into a section other than the default<br>
+  // text.<br>
+  bool UsedNonDefaultText;<br>
+<br>
   // Version of dwarf we're emitting.<br>
   unsigned DwarfVersion;<br>
<br>
<br>
Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?rev=200269&r1=200268&r2=200269&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?rev=200269&r1=200268&r2=200269&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Mon Jan 27 18:49:26 2014<br>
@@ -232,7 +232,7 @@ static const char *getSectionPrefixForGl<br>
<br>
 const MCSection *TargetLoweringObjectFileELF::<br>
 SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,<br>
-                       Mangler *Mang, TargetMachine &TM) const {<br>
+                       Mangler *Mang, const TargetMachine &TM) const {<br>
   // If we have -ffunction-section or -fdata-section then we should emit the<br>
   // global value to a uniqued section specifically for it.<br>
   bool EmitUniquedSection;<br>
@@ -258,8 +258,6 @@ SelectSectionForGlobal(const GlobalValue<br>
       Flags |= ELF::SHF_GROUP;<br>
     }<br>
<br>
-    // Set that we've used a unique section name in the target machine.<br>
-    TM.setDebugUseUniqueSections(true);<br>
     return getContext().getELFSection(Name.str(),<br>
                                       getELFSectionType(Name.str(), Kind),<br>
                                       Flags, Kind, 0, Group);<br>
@@ -531,7 +529,7 @@ getExplicitSectionGlobal(const GlobalVal<br>
<br>
 const MCSection *TargetLoweringObjectFileMachO::<br>
 SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,<br>
-                       Mangler *Mang, TargetMachine &TM) const {<br>
+                       Mangler *Mang, const TargetMachine &TM) const {<br>
<br>
   // Handle thread local data.<br>
   if (Kind.isThreadBSS()) return TLSBSSSection;<br>
@@ -756,7 +754,7 @@ static const char *getCOFFSectionNameFor<br>
<br>
 const MCSection *TargetLoweringObjectFileCOFF::<br>
 SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,<br>
-                       Mangler *Mang, TargetMachine &TM) const {<br>
+                       Mangler *Mang, const TargetMachine &TM) const {<br>
<br>
   // If this global is linkonce/weak and the target handles this by emitting it<br>
   // into a 'uniqued' section name, create and return the section now.<br>
<br>
Modified: llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.cpp?rev=200269&r1=200268&r2=200269&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.cpp?rev=200269&r1=200268&r2=200269&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.cpp (original)<br>
+++ llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.cpp Mon Jan 27 18:49:26 2014<br>
@@ -87,7 +87,7 @@ IsGlobalInSmallSection(const GlobalValue<br>
<br>
 const MCSection *HexagonTargetObjectFile::<br>
 SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,<br>
-                       Mangler *Mang, TargetMachine &TM) const {<br>
+                       Mangler *Mang, const TargetMachine &TM) const {<br>
<br>
   // Handle Small Section classification here.<br>
   if (Kind.isBSS() && IsGlobalInSmallSection(GV, TM, Kind))<br>
<br>
Modified: llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.h?rev=200269&r1=200268&r2=200269&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.h?rev=200269&r1=200268&r2=200269&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.h (original)<br>
+++ llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.h Mon Jan 27 18:49:26 2014<br>
@@ -30,9 +30,10 @@ namespace llvm {<br>
                                 const TargetMachine &TM) const;<br>
<br>
     bool IsSmallDataEnabled () const;<br>
-    const MCSection *SelectSectionForGlobal(const GlobalValue *GV,<br>
-                                            SectionKind Kind, Mangler *Mang,<br>
-                                            TargetMachine &TM) const;<br>
+    const MCSection* SelectSectionForGlobal(const GlobalValue *GV,<br>
+                                            SectionKind Kind,<br>
+                                            Mangler *Mang,<br>
+                                            const TargetMachine &TM) const;<br>
   };<br>
<br>
 } // namespace llvm<br>
<br>
Modified: llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp?rev=200269&r1=200268&r2=200269&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp?rev=200269&r1=200268&r2=200269&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp (original)<br>
+++ llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp Mon Jan 27 18:49:26 2014<br>
@@ -103,7 +103,7 @@ IsGlobalInSmallSection(const GlobalValue<br>
<br>
 const MCSection *MipsTargetObjectFile::<br>
 SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,<br>
-                       Mangler *Mang, TargetMachine &TM) const {<br>
+                       Mangler *Mang, const TargetMachine &TM) const {<br>
   // TODO: Could also support "weak" symbols as well with ".gnu.linkonce.s.*"<br>
   // sections?<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h?rev=200269&r1=200268&r2=200269&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h?rev=200269&r1=200268&r2=200269&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h (original)<br>
+++ llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h Mon Jan 27 18:49:26 2014<br>
@@ -31,8 +31,9 @@ namespace llvm {<br>
                                 const TargetMachine &TM) const;<br>
<br>
     const MCSection *SelectSectionForGlobal(const GlobalValue *GV,<br>
-                                            SectionKind Kind, Mangler *Mang,<br>
-                                            TargetMachine &TM) const;<br>
+                                            SectionKind Kind,<br>
+                                            Mangler *Mang,<br>
+                                            const TargetMachine &TM) const;<br>
<br>
     // TODO: Classify globals as mips wishes.<br>
     const MCSection *getReginfoSection() const { return ReginfoSection; }<br>
<br>
Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.cpp?rev=200269&r1=200268&r2=200269&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.cpp?rev=200269&r1=200268&r2=200269&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.cpp (original)<br>
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.cpp Mon Jan 27 18:49:26 2014<br>
@@ -24,7 +24,7 @@ Initialize(MCContext &Ctx, const TargetM<br>
<br>
 const MCSection * PPC64LinuxTargetObjectFile::<br>
 SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,<br>
-                       Mangler *Mang, TargetMachine &TM) const {<br>
+                       Mangler *Mang, const TargetMachine &TM) const {<br>
<br>
   const MCSection *DefaultSection =<br>
     TargetLoweringObjectFileELF::SelectSectionForGlobal(GV, Kind, Mang, TM);<br>
<br>
Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.h?rev=200269&r1=200268&r2=200269&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.h?rev=200269&r1=200268&r2=200269&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.h (original)<br>
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.h Mon Jan 27 18:49:26 2014<br>
@@ -22,10 +22,9 @@ namespace llvm {<br>
<br>
     virtual void Initialize(MCContext &Ctx, const TargetMachine &TM);<br>
<br>
-    virtual const MCSection *SelectSectionForGlobal(const GlobalValue *GV,<br>
-                                                    SectionKind Kind,<br>
-                                                    Mangler *Mang,<br>
-                                                    TargetMachine &TM) const;<br>
+    virtual const MCSection *<br>
+    SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,<br>
+                           Mangler *Mang, const TargetMachine &TM) const;<br>
<br>
     /// \brief Describe a TLS variable address within debug info.<br>
     virtual const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const;<br>
<br>
Modified: llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp?rev=200269&r1=200268&r2=200269&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp?rev=200269&r1=200268&r2=200269&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp (original)<br>
+++ llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp Mon Jan 27 18:49:26 2014<br>
@@ -265,7 +265,7 @@ SectionKind TargetLoweringObjectFile::ge<br>
 /// be passed external (or available externally) globals.<br>
 const MCSection *TargetLoweringObjectFile::<br>
 SectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler *Mang,<br>
-                 TargetMachine &TM) const {<br>
+                 const TargetMachine &TM) const {<br>
   // Select section name.<br>
   if (GV->hasSection())<br>
     return getExplicitSectionGlobal(GV, Kind, Mang, TM);<br>
@@ -277,9 +277,11 @@ SectionForGlobal(const GlobalValue *GV,<br>
<br>
<br>
 // Lame default implementation. Calculate the section name for global.<br>
-const MCSection *TargetLoweringObjectFile::SelectSectionForGlobal(<br>
-    const GlobalValue *GV, SectionKind Kind, Mangler *Mang,<br>
-    TargetMachine &TM) const {<br>
+const MCSection *<br>
+TargetLoweringObjectFile::SelectSectionForGlobal(const GlobalValue *GV,<br>
+                                                 SectionKind Kind,<br>
+                                                 Mangler *Mang,<br>
+                                                 const TargetMachine &TM) const{<br>
   assert(!Kind.isThreadLocal() && "Doesn't support TLS");<br>
<br>
   if (Kind.isText())<br>
<br>
Modified: llvm/trunk/lib/Target/TargetMachine.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetMachine.cpp?rev=200269&r1=200268&r2=200269&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetMachine.cpp?rev=200269&r1=200268&r2=200269&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/TargetMachine.cpp (original)<br>
+++ llvm/trunk/lib/Target/TargetMachine.cpp Mon Jan 27 18:49:26 2014<br>
@@ -55,7 +55,6 @@ TargetMachine::TargetMachine(const Targe<br>
     MCUseLoc(true),<br>
     MCUseCFI(true),<br>
     MCUseDwarfDirectory(false),<br>
-    DebugUseUniqueSections(false),<br>
     RequireStructuredCFG(false),<br>
     Options(Options) {<br>
 }<br>
<br>
Modified: llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.cpp?rev=200269&r1=200268&r2=200269&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.cpp?rev=200269&r1=200268&r2=200269&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.cpp (original)<br>
+++ llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.cpp Mon Jan 27 18:49:26 2014<br>
@@ -130,7 +130,7 @@ getExplicitSectionGlobal(const GlobalVal<br>
<br>
 const MCSection *XCoreTargetObjectFile::<br>
 SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler *Mang,<br>
-                       TargetMachine &TM) const{<br>
+                       const TargetMachine &TM) const{<br>
   if (Kind.isText())                      return TextSection;<br>
   if (Kind.isMergeable1ByteCString())     return CStringSection;<br>
   if (Kind.isMergeableConst4())           return MergeableConst4Section;<br>
<br>
Modified: llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.h?rev=200269&r1=200268&r2=200269&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.h?rev=200269&r1=200268&r2=200269&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.h (original)<br>
+++ llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.h Mon Jan 27 18:49:26 2014<br>
@@ -27,10 +27,9 @@ static const unsigned CodeModelLargeSize<br>
     getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,<br>
                              Mangler *Mang, const TargetMachine &TM) const;<br>
<br>
-    virtual const MCSection *SelectSectionForGlobal(const GlobalValue *GV,<br>
-                                                    SectionKind Kind,<br>
-                                                    Mangler *Mang,<br>
-                                                    TargetMachine &TM) const;<br>
+    virtual const MCSection *<br>
+    SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,<br>
+                           Mangler *Mang, const TargetMachine &TM) const;<br>
<br>
     virtual const MCSection *getSectionForConstant(SectionKind Kind) const;<br>
   };<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>