we already know the sectionkind when invoking SelectSectionForGlobal,
pass it in instead of recomputing it.

llvm-svn: 76990
diff --git a/llvm/lib/Target/TargetAsmInfo.cpp b/llvm/lib/Target/TargetAsmInfo.cpp
index 1ed9a71..9893bf9 100644
--- a/llvm/lib/Target/TargetAsmInfo.cpp
+++ b/llvm/lib/Target/TargetAsmInfo.cpp
@@ -300,14 +300,13 @@
   }
   
   // Use default section depending on the 'type' of global
-  return SelectSectionForGlobal(GV);
+  return SelectSectionForGlobal(GV, Kind);
 }
 
 // Lame default implementation. Calculate the section name for global.
 const Section*
-TargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
-  SectionKind::Kind Kind = SectionKindForGlobal(GV);
-
+TargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV,
+                                      SectionKind::Kind Kind) const {
   if (Kind == SectionKind::Text)
     return getTextSection();