Add default section name resolution routine

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53292 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp
index 404e152..8e34fc3 100644
--- a/lib/Target/TargetAsmInfo.cpp
+++ b/lib/Target/TargetAsmInfo.cpp
@@ -254,3 +254,15 @@
 
   return flags;
 }
+
+const char*
+TargetAsmInfo::SectionForGlobal(const GlobalValue *GV) const {
+  SectionKind::Kind kind = SectionKindForGlobal(GV);
+
+  if (kind == SectionKind::Text)
+    return getTextSection();
+  else if (kind == SectionKind::BSS && getBSSSection())
+    return getBSSSection();
+
+  return getDataSection();
+}