[llvm-commits] [llvm] r77131 - /llvm/trunk/lib/Target/TargetAsmInfo.cpp
Chris Lattner
sabre at nondot.org
Sat Jul 25 22:57:31 PDT 2009
Author: lattner
Date: Sun Jul 26 00:57:07 2009
New Revision: 77131
URL: http://llvm.org/viewvc/llvm-project?rev=77131&view=rev
Log:
improve the default impl of getSectionForMergableConstant by
putting readonly constants in the readonly section if we have one.
Modified:
llvm/trunk/lib/Target/TargetAsmInfo.cpp
Modified: llvm/trunk/lib/Target/TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetAsmInfo.cpp?rev=77131&r1=77130&r2=77131&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/TargetAsmInfo.cpp Sun Jul 26 00:57:07 2009
@@ -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();
}
More information about the llvm-commits
mailing list