[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp PPCTargetAsmInfo.cpp

2007-03-07 Thread Evan Cheng


Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.235 - 1.236
PPCTargetAsmInfo.cpp updated: 1.18 - 1.19
---
Log message:

For Darwin, put constant data into .const, .const_data, .literal{4|8|16}
sections.

---
Diffs of the changes:  (+27 -2)

 PPCAsmPrinter.cpp|   26 --
 PPCTargetAsmInfo.cpp |3 +++
 2 files changed, 27 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.235 
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.236
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.235 Fri Mar  2 23:29:51 2007
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp   Wed Mar  7 19:25:25 2007
@@ -893,7 +893,8 @@
 O  Directive  name  \n;
 
 Constant *C = I-getInitializer();
-unsigned Size = TD-getTypeSize(C-getType());
+const Type *Type = C-getType();
+unsigned Size = TD-getTypeSize(Type);
 unsigned Align = TD-getPreferredAlignmentLog(I);
 
 if (C-isNullValue()  /* FIXME: Verify correct */
@@ -937,7 +938,28 @@
   }
 }
 
-SwitchToDataSection(\t.data, I);
+if (!I-isConstant())
+  SwitchToDataSection(TAI-getDataSection(), I);
+else {
+  // Read-only data.
+  bool isIntFPLiteral = Type-isInteger()  || Type-isFloatingPoint();
+  if (C-ContainsRelocations() 
+  TM.getRelocationModel() != Reloc::Static)
+SwitchToDataSection(\t.const_data\n);
+  else if (isIntFPLiteral  Size == 4 
+   TAI-getFourByteConstantSection())
+SwitchToDataSection(TAI-getFourByteConstantSection(), I);
+  else if (isIntFPLiteral  Size == 8 
+   TAI-getEightByteConstantSection())
+SwitchToDataSection(TAI-getEightByteConstantSection(), I);
+  else if (isIntFPLiteral  Size == 16 
+   TAI-getSixteenByteConstantSection())
+SwitchToDataSection(TAI-getSixteenByteConstantSection(), I);
+  else if (TAI-getReadOnlySection())
+SwitchToDataSection(TAI-getReadOnlySection(), I);
+  else
+SwitchToDataSection(TAI-getDataSection(), I);
+}
 break;
   default:
 cerr  Unknown linkage type!;


Index: llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.18 
llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.19
--- llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.18   Wed Feb 21 16:43:40 2007
+++ llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cppWed Mar  7 19:25:25 2007
@@ -57,6 +57,9 @@
   JumpTableDataSection = .const;
   GlobalDirective = \t.globl\t;
   CStringSection = \t.cstring;
+  FourByteConstantSection = \t.literal4\n;
+  EightByteConstantSection = \t.literal8\n;
+  ReadOnlySection = \t.const\n;
   if (TM.getRelocationModel() == Reloc::Static) {
 StaticCtorsSection = .constructor;
 StaticDtorsSection = .destructor;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp PPCTargetAsmInfo.cpp

2007-01-30 Thread Evan Cheng


Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.230 - 1.231
PPCTargetAsmInfo.cpp updated: 1.15 - 1.16
---
Log message:

Darwin -static should codegen static ctors / dtors to .constructor / 
.destructor sections.

---
Diffs of the changes:  (+15 -3)

 PPCAsmPrinter.cpp|9 -
 PPCTargetAsmInfo.cpp |9 +++--
 2 files changed, 15 insertions(+), 3 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.230 
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.231
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.230 Fri Jan 26 15:22:28 2007
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp   Tue Jan 30 02:04:53 2007
@@ -855,8 +855,15 @@
 if (!I-hasInitializer()) continue;   // External global require no code
 
 // Check to see if this is a special global used by LLVM, if so, emit it.
-if (EmitSpecialLLVMGlobal(I))
+if (EmitSpecialLLVMGlobal(I)) {
+  if (TM.getRelocationModel() == Reloc::Static) {
+if (I-getName() == llvm.global_ctors)
+  O  .reference .constructors_used\n;
+else if (I-getName() == llvm.global_dtors)
+  O  .reference .destructors_used\n;
+  }
   continue;
+}
 
 std::string name = Mang-getValueName(I);
 


Index: llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.15 
llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.16
--- llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.15   Mon Jan 29 12:51:14 2007
+++ llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cppTue Jan 30 02:04:53 2007
@@ -53,8 +53,13 @@
   JumpTableDataSection = .const;
   GlobalDirective = \t.globl\t;
   CStringSection = \t.cstring;
-  StaticCtorsSection = .mod_init_func;
-  StaticDtorsSection = .mod_term_func;
+  if (TM.getRelocationModel() == Reloc::Static) {
+StaticCtorsSection = .constructor;
+StaticDtorsSection = .destructor;
+  } else {
+StaticCtorsSection = .mod_init_func;
+StaticDtorsSection = .mod_term_func;
+  }
   UsedDirective = \t.no_dead_strip\t;
   WeakRefDirective = \t.weak_reference\t;
   HiddenDirective = \t.private_extern\t;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp PPCTargetAsmInfo.cpp

2007-01-13 Thread Chris Lattner


Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.227 - 1.228
PPCTargetAsmInfo.cpp updated: 1.10 - 1.11
---
Log message:

add support for hidden visibility to darwin/ppc and linux/ppc targets


---
Diffs of the changes:  (+22 -1)

 PPCAsmPrinter.cpp|   22 +-
 PPCTargetAsmInfo.cpp |1 +
 2 files changed, 22 insertions(+), 1 deletion(-)


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.227 
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.228
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.227 Thu Dec 21 14:26:09 2006
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp   Sun Jan 14 00:37:54 2007
@@ -550,6 +550,11 @@
 O  \t.weak\t  CurrentFnName  '\n';
 break;
   }
+  
+  if (F-hasHiddenVisibility())
+if (const char *Directive = TAI-getHiddenDirective())
+  O  Directive  CurrentFnName  \n;
+  
   EmitAlignment(2, F);
   O  CurrentFnName  :\n;
 
@@ -608,8 +613,13 @@
 // Check to see if this is a special global used by LLVM, if so, emit it.
 if (EmitSpecialLLVMGlobal(I))
   continue;
-
+
 std::string name = Mang-getValueName(I);
+
+if (I-hasHiddenVisibility())
+  if (const char *Directive = TAI-getHiddenDirective())
+O  Directive  name  \n;
+
 Constant *C = I-getInitializer();
 unsigned Size = TD-getTypeSize(C-getType());
 unsigned Align = TD-getPreferredAlignmentLog(I);
@@ -749,6 +759,11 @@
 O  \t.weak_definition\t  CurrentFnName  \n;
 break;
   }
+  
+  if (F-hasHiddenVisibility())
+if (const char *Directive = TAI-getHiddenDirective())
+  O  Directive  CurrentFnName  \n;
+  
   EmitAlignment(4, F);
   O  CurrentFnName  :\n;
 
@@ -840,6 +855,11 @@
   continue;
 
 std::string name = Mang-getValueName(I);
+
+if (I-hasHiddenVisibility())
+  if (const char *Directive = TAI-getHiddenDirective())
+O  Directive  name  \n;
+
 Constant *C = I-getInitializer();
 unsigned Size = TD-getTypeSize(C-getType());
 unsigned Align = TD-getPreferredAlignmentLog(I);


Index: llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.10 
llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.11
--- llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.10   Thu Dec 21 14:26:09 2006
+++ llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cppSun Jan 14 00:37:54 2007
@@ -55,6 +55,7 @@
   StaticDtorsSection = .mod_term_func;
   UsedDirective = \t.no_dead_strip\t;
   WeakRefDirective = \t.weak_reference\t;
+  HiddenDirective = \t.private_extern\t;
 }
 
 LinuxTargetAsmInfo::LinuxTargetAsmInfo(const PPCTargetMachine TM)



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp PPCTargetAsmInfo.cpp

2006-12-01 Thread Evan Cheng


Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.215 - 1.216
PPCTargetAsmInfo.cpp updated: 1.8 - 1.9
---
Log message:

Add weak reference directive.

---
Diffs of the changes:  (+8 -5)

 PPCAsmPrinter.cpp|   12 +++-
 PPCTargetAsmInfo.cpp |1 +
 2 files changed, 8 insertions(+), 5 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.215 
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.216
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.215 Fri Dec  1 11:39:22 2006
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp   Fri Dec  1 14:47:11 2006
@@ -647,11 +647,13 @@
 }
   }
 
-  if (ExtWeakSymbols.begin() != ExtWeakSymbols.end())
-SwitchToDataSection();
-  for (std::setstd::string::iterator i = ExtWeakSymbols.begin(),
-   e = ExtWeakSymbols.end(); i != e; ++i) {
-O  \t.weak_reference   *i  \n;
+  if (TAI-getWeakRefDirective()) {
+if (ExtWeakSymbols.begin() != ExtWeakSymbols.end())
+  SwitchToDataSection();
+for (std::setstd::string::iterator i = ExtWeakSymbols.begin(),
+ e = ExtWeakSymbols.end(); i != e; ++i) {
+  O  TAI-getWeakRefDirective()  *i  \n;
+}
   }
 
   bool isPPC64 = TD-getPointerSizeInBits() == 64;


Index: llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.8 
llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.9
--- llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.8Thu Oct 26 16:48:57 2006
+++ llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cppFri Dec  1 14:47:11 2006
@@ -33,6 +33,7 @@
   StaticCtorsSection = .mod_init_func;
   StaticDtorsSection = .mod_term_func;
   UsedDirective = \t.no_dead_strip\t;
+  WeakRefDirective = \t.weak_reference\t;
   InlineAsmStart = # InlineAsm Start;
   InlineAsmEnd = # InlineAsm End;
   



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp PPCTargetAsmInfo.cpp

2006-10-26 Thread Evan Cheng


Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.202 - 1.203
PPCTargetAsmInfo.cpp updated: 1.7 - 1.8
---
Log message:

Place cstrings in .cstring section.

---
Diffs of the changes:  (+9 -0)

 PPCAsmPrinter.cpp|8 
 PPCTargetAsmInfo.cpp |1 +
 2 files changed, 9 insertions(+)


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.202 
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.203
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.202 Tue Oct 24 15:32:14 2006
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp   Thu Oct 26 16:48:57 2006
@@ -548,6 +548,14 @@
 O  \t.globl   name  \n;
 // FALL THROUGH
   case GlobalValue::InternalLinkage:
+if (TAI-getCStringSection()) {
+  const ConstantArray *CVA = dyn_castConstantArray(C);
+  if (CVA  CVA-isCString()) {
+SwitchToDataSection(TAI-getCStringSection(), I);
+break;
+  }
+}
+
 SwitchToDataSection(\t.data, I);
 break;
   default:


Index: llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.7 
llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.8
--- llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.7Tue Oct 17 06:30:57 2006
+++ llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cppThu Oct 26 16:48:57 2006
@@ -28,6 +28,7 @@
   AlignmentIsInBytes = false;
   ConstantPoolSection = \t.const\t;
   JumpTableDataSection = .const;
+  CStringSection = \t.cstring;
   LCOMMDirective = \t.lcomm\t;
   StaticCtorsSection = .mod_init_func;
   StaticDtorsSection = .mod_term_func;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp PPCTargetAsmInfo.cpp PPCTargetAsmInfo.h

2006-10-04 Thread Chris Lattner


Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.198 - 1.199
PPCTargetAsmInfo.cpp updated: 1.3 - 1.4
PPCTargetAsmInfo.h updated: 1.1 - 1.2
---
Log message:

implement DarwinTargetAsmInfo::getSectionForFunction, use it when outputting
function bodies


---
Diffs of the changes:  (+21 -6)

 PPCAsmPrinter.cpp|6 ++
 PPCTargetAsmInfo.cpp |   14 +-
 PPCTargetAsmInfo.h   |7 ++-
 3 files changed, 21 insertions(+), 6 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.198 
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.199
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.198 Wed Oct  4 19:26:05 2006
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp   Wed Oct  4 19:35:50 2006
@@ -422,19 +422,17 @@
 
   // Print out labels for the function.
   const Function *F = MF.getFunction();
+  SwitchToTextSection(TAI-getSectionForFunction(*F), F);
+  
   switch (F-getLinkage()) {
   default: assert(0  Unknown linkage type!);
   case Function::InternalLinkage:  // Symbols default to internal.
-SwitchToTextSection(\t.text, F);
 break;
   case Function::ExternalLinkage:
-SwitchToTextSection(\t.text, F);
 O  \t.globl\t  CurrentFnName  \n;
 break;
   case Function::WeakLinkage:
   case Function::LinkOnceLinkage:
-SwitchToTextSection(
-.section __TEXT,__textcoal_nt,coalesced,pure_instructions, 
F);
 O  \t.globl\t  CurrentFnName  \n;
 O  \t.weak_definition\t  CurrentFnName  \n;
 break;


Index: llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.3 
llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.4
--- llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.3Mon Sep 25 22:39:53 2006
+++ llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cppWed Oct  4 19:35:50 2006
@@ -13,7 +13,7 @@
 
 #include PPCTargetAsmInfo.h
 #include PPCTargetMachine.h
-
+#include llvm/Function.h
 using namespace llvm;
 
 DarwinTargetAsmInfo::DarwinTargetAsmInfo(const PPCTargetMachine TM) {
@@ -50,3 +50,15 @@
   DwarfRangesSection = .section __DWARF,__debug_ranges;
   DwarfMacInfoSection = .section __DWARF,__debug_macinfo;
 }
+
+
+const char *DarwinTargetAsmInfo::getSectionForFunction(const Function F) 
const{
+  switch (F.getLinkage()) {
+  default: assert(0  Unknown linkage type!);
+  case Function::ExternalLinkage:
+  case Function::InternalLinkage: return TextSection;
+  case Function::WeakLinkage:
+  case Function::LinkOnceLinkage:
+return .section __TEXT,__textcoal_nt,coalesced,pure_instructions;
+  }
+}


Index: llvm/lib/Target/PowerPC/PPCTargetAsmInfo.h
diff -u llvm/lib/Target/PowerPC/PPCTargetAsmInfo.h:1.1 
llvm/lib/Target/PowerPC/PPCTargetAsmInfo.h:1.2
--- llvm/lib/Target/PowerPC/PPCTargetAsmInfo.h:1.1  Thu Sep  7 17:05:02 2006
+++ llvm/lib/Target/PowerPC/PPCTargetAsmInfo.h  Wed Oct  4 19:35:50 2006
@@ -23,9 +23,14 @@
 
   struct DarwinTargetAsmInfo : public TargetAsmInfo {
 DarwinTargetAsmInfo(const PPCTargetMachine TM);
+
+/// getSectionForFunction - Return the section that we should emit the
+/// specified function body into.  This defaults to 'TextSection'.  This
+/// should most likely be overridden by the target to put linkonce/weak
+/// functions into special sections.
+virtual const char *getSectionForFunction(const Function F) const;
   };
 
-
 } // namespace llvm
 
 #endif



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp PPCTargetAsmInfo.cpp PPCTargetAsmInfo.h

2006-10-04 Thread Chris Lattner


Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.199 - 1.200
PPCTargetAsmInfo.cpp updated: 1.4 - 1.5
PPCTargetAsmInfo.h updated: 1.2 - 1.3
---
Log message:

Move getSectionForFunction to AsmPrinter, change it to return a string.


---
Diffs of the changes:  (+17 -19)

 PPCAsmPrinter.cpp|   19 +--
 PPCTargetAsmInfo.cpp |   11 ---
 PPCTargetAsmInfo.h   |6 --
 3 files changed, 17 insertions(+), 19 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.199 
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.200
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.199 Wed Oct  4 19:35:50 2006
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp   Wed Oct  4 21:42:20 2006
@@ -238,7 +238,6 @@
 
 virtual bool runOnMachineFunction(MachineFunction F) = 0;
 virtual bool doFinalization(Module M) = 0;
-
   };
 
   /// DarwinAsmPrinter - PowerPC assembly printer, customized for Darwin/Mac OS
@@ -267,6 +266,9 @@
   PPCAsmPrinter::getAnalysisUsage(AU);
 }
 
+/// getSectionForFunction - Return the section that we should emit the
+/// specified function body into.
+virtual std::string getSectionForFunction(const Function F) const;
   };
 } // end of anonymous namespace
 
@@ -408,6 +410,19 @@
   return;
 }
 
+
+
+std::string DarwinAsmPrinter::getSectionForFunction(const Function F) const {
+  switch (F.getLinkage()) {
+  default: assert(0  Unknown linkage type!);
+  case Function::ExternalLinkage:
+  case Function::InternalLinkage: return TAI-getTextSection();
+  case Function::WeakLinkage:
+  case Function::LinkOnceLinkage:
+return .section __TEXT,__textcoal_nt,coalesced,pure_instructions;
+  }
+}
+
 /// runOnMachineFunction - This uses the printMachineInstruction()
 /// method to print assembly for each instruction.
 ///
@@ -422,7 +437,7 @@
 
   // Print out labels for the function.
   const Function *F = MF.getFunction();
-  SwitchToTextSection(TAI-getSectionForFunction(*F), F);
+  SwitchToTextSection(getSectionForFunction(*F).c_str(), F);
   
   switch (F-getLinkage()) {
   default: assert(0  Unknown linkage type!);


Index: llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.4 
llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.5
--- llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.4Wed Oct  4 19:35:50 2006
+++ llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cppWed Oct  4 21:42:20 2006
@@ -51,14 +51,3 @@
   DwarfMacInfoSection = .section __DWARF,__debug_macinfo;
 }
 
-
-const char *DarwinTargetAsmInfo::getSectionForFunction(const Function F) 
const{
-  switch (F.getLinkage()) {
-  default: assert(0  Unknown linkage type!);
-  case Function::ExternalLinkage:
-  case Function::InternalLinkage: return TextSection;
-  case Function::WeakLinkage:
-  case Function::LinkOnceLinkage:
-return .section __TEXT,__textcoal_nt,coalesced,pure_instructions;
-  }
-}


Index: llvm/lib/Target/PowerPC/PPCTargetAsmInfo.h
diff -u llvm/lib/Target/PowerPC/PPCTargetAsmInfo.h:1.2 
llvm/lib/Target/PowerPC/PPCTargetAsmInfo.h:1.3
--- llvm/lib/Target/PowerPC/PPCTargetAsmInfo.h:1.2  Wed Oct  4 19:35:50 2006
+++ llvm/lib/Target/PowerPC/PPCTargetAsmInfo.h  Wed Oct  4 21:42:20 2006
@@ -23,12 +23,6 @@
 
   struct DarwinTargetAsmInfo : public TargetAsmInfo {
 DarwinTargetAsmInfo(const PPCTargetMachine TM);
-
-/// getSectionForFunction - Return the section that we should emit the
-/// specified function body into.  This defaults to 'TextSection'.  This
-/// should most likely be overridden by the target to put linkonce/weak
-/// functions into special sections.
-virtual const char *getSectionForFunction(const Function F) const;
   };
 
 } // namespace llvm



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits