Unbreaking static ctors patch.
authorAnton Korobeynikov <asl@math.spbu.ru>
Tue, 31 Oct 2006 06:11:06 +0000 (06:11 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Tue, 31 Oct 2006 06:11:06 +0000 (06:11 +0000)
Defaulting second arguments of SwitchTo*Section, this should make things
somehow clearer.

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

include/llvm/CodeGen/AsmPrinter.h
lib/Target/X86/X86AsmPrinter.cpp

index 223841e1d20858051128b749af259ebad4ecb6b6..7be2482b6252e708e6daa687e7ffd17e7e3018b0 100644 (file)
@@ -79,7 +79,7 @@ namespace llvm {
     ///
     /// This method is used when about to emit executable code.
     ///
-    void SwitchToTextSection(const char *NewSection, const GlobalValue *GV);
+    void SwitchToTextSection(const char *NewSection, const GlobalValue *GV = NULL);
 
     /// SwitchToDataSection - Switch to the specified section of the executable
     /// if we are not already in it!  If GV is non-null and if the global has an
@@ -93,7 +93,7 @@ namespace llvm {
     /// is the same as the SwitchToTextSection method, but not all assemblers
     /// are the same.
     ///
-    void SwitchToDataSection(const char *NewSection, const GlobalValue *GV);
+    void SwitchToDataSection(const char *NewSection, const GlobalValue *GV = NULL);
     
     /// getGlobalLinkName - Returns the asm/link name of of the specified
     /// global variable.  Should be overridden by each target asm printer to
index f27f44053bbc4b2ef99d7616f420854c0d1c41cf..9ef0ad1027e742795c685b6bd25a3b53b5b0833a 100644 (file)
@@ -229,7 +229,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
             SectionName += ",\"aw\",@progbits";
           }
 
-          SwitchToDataSection(SectionName.c_str(), I);
+          SwitchToDataSection(SectionName.c_str());
         } else {
           SwitchToDataSection(TAI->getDataSection(), I);
         }