improve the default impl of getSectionForMergableConstant by
putting readonly constants in the readonly section if we have one.

llvm-svn: 77131
diff --git a/llvm/lib/Target/TargetAsmInfo.cpp b/llvm/lib/Target/TargetAsmInfo.cpp
index 02e01be..51042da 100644
--- a/llvm/lib/Target/TargetAsmInfo.cpp
+++ b/llvm/lib/Target/TargetAsmInfo.cpp
@@ -364,8 +364,10 @@
 const Section *
 TargetAsmInfo::getSectionForMergableConstant(uint64_t Size,
                                              unsigned ReloInfo) const {
-  // FIXME: Support data.rel stuff someday
-  // Lame default implementation. Calculate the section name for machine const.
+  if (ReloInfo == 0)
+    if (const Section *S = getReadOnlySection())
+      return S;
+  
   return getDataSection();
 }