change an accessor to a predicate.
authorChris Lattner <sabre@nondot.org>
Tue, 19 Jan 2010 02:13:06 +0000 (02:13 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 19 Jan 2010 02:13:06 +0000 (02:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93839 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetLoweringObjectFile.h
lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp

index fec56fa442cbcb8bb83bdc1ec6a77128959e4822..b8da445cebd57555cf507fc1bb1ad44d9ef46fd7 100644 (file)
@@ -315,8 +315,8 @@ public:
   
   /// getDataCommonSection - Return the "__DATA,__common" section we put
   /// zerofill (aka bss) data into.
-  const MCSection *getDataCommonSection() const {
-    return DataCommonSection;
+  bool isDataCommonSection(const MCSection *Section) const {
+    return Section == DataCommonSection;
   }
   
   /// getLazySymbolPointerSection - Return the section corresponding to
index 30f9fec867ecd9a485020021282ded3cccfedbfa..2ba940bb49206f19cad1a98e9cd8dd44bf3e2018 100644 (file)
@@ -1205,8 +1205,8 @@ void ARMAsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) {
   // emission.
   if (GVKind.isBSS() && MAI->hasMachoZeroFillDirective()) {
     TargetLoweringObjectFileMachO &TLOFMacho = 
-    static_cast<TargetLoweringObjectFileMachO &>(getObjFileLowering());
-    if (TheSection == TLOFMacho.getDataCommonSection()) {
+      static_cast<TargetLoweringObjectFileMachO &>(getObjFileLowering());
+    if (TLOFMacho.isDataCommonSection(TheSection)) {
       // .globl _foo
       OutStreamer.EmitSymbolAttribute(GVarSym, MCStreamer::Global);
       // .zerofill __DATA, __common, _foo, 400, 5
index fad1c27fac65493a6e5bce0dfc0441e182cb10f9..28dd193deb2b9e648025907d522e3eb799486283 100644 (file)
@@ -953,8 +953,8 @@ void PPCDarwinAsmPrinter::PrintGlobalVariable(const GlobalVariable *GVar) {
   // emission.
   if (GVKind.isBSS() && MAI->hasMachoZeroFillDirective()) {
     TargetLoweringObjectFileMachO &TLOFMacho = 
-    static_cast<TargetLoweringObjectFileMachO &>(getObjFileLowering());
-    if (TheSection == TLOFMacho.getDataCommonSection()) {
+      static_cast<TargetLoweringObjectFileMachO &>(getObjFileLowering());
+    if (TLOFMacho.isDataCommonSection(TheSection)) {
       // .globl _foo
       OutStreamer.EmitSymbolAttribute(GVarSym, MCStreamer::Global);
       // .zerofill __DATA, __common, _foo, 400, 5
index 3c290e8efd3c9f9ef50f9a6fc7e384306f86928b..3bf4c4c9af724d75d8c566da475a139bf3cd69af 100644 (file)
@@ -684,8 +684,8 @@ void X86AsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) {
   // emission.
   if (GVKind.isBSS() && MAI->hasMachoZeroFillDirective()) {
     TargetLoweringObjectFileMachO &TLOFMacho = 
-      static_cast<TargetLoweringObjectFileMachO &>(getObjFileLowering());
-    if (TheSection == TLOFMacho.getDataCommonSection()) {
+        static_cast<TargetLoweringObjectFileMachO &>(getObjFileLowering());
+    if (TLOFMacho.isDataCommonSection(TheSection)) {
       // .globl _foo
       OutStreamer.EmitSymbolAttribute(GVarSym, MCStreamer::Global);
       // .zerofill __DATA, __common, _foo, 400, 5