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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76990 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/PIC16/PIC16TargetAsmInfo.cpp b/lib/Target/PIC16/PIC16TargetAsmInfo.cpp
index fedb0b8..6f4b0c5 100644
--- a/lib/Target/PIC16/PIC16TargetAsmInfo.cpp
+++ b/lib/Target/PIC16/PIC16TargetAsmInfo.cpp
@@ -186,14 +186,15 @@
 // Override default implementation to put the true globals into
 // multiple data sections if required.
 const Section*
-PIC16TargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV1) const {
+PIC16TargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV1,
+                                           SectionKind::Kind Kind) const {
   // We select the section based on the initializer here, so it really
   // has to be a GlobalVariable.
   const GlobalVariable *GV = dyn_cast<GlobalVariable>(GV1); 
   if (!GV)
-    return TargetAsmInfo::SelectSectionForGlobal(GV1);
+    return TargetAsmInfo::SelectSectionForGlobal(GV1, Kind);
 
-  // Record Exteranl Var Decls.
+  // Record External Var Decls.
   if (GV->isDeclaration()) {
     ExternalVarDecls->Items.push_back(GV);
     return ExternalVarDecls->S_;
@@ -225,7 +226,7 @@
     return getROSectionForGlobal(GV);
 
   // Else let the default implementation take care of it.
-  return TargetAsmInfo::SelectSectionForGlobal(GV);
+  return TargetAsmInfo::SelectSectionForGlobal(GV, Kind);
 }
 
 PIC16TargetAsmInfo::~PIC16TargetAsmInfo() {