projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e76db0
)
improve the default impl of getSectionForMergableConstant by
author
Chris Lattner
<sabre@nondot.org>
Sun, 26 Jul 2009 05:57:07 +0000
(
05:57
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 26 Jul 2009 05:57:07 +0000
(
05:57
+0000)
putting readonly constants in the readonly section if we have one.
llvm-svn: 77131
llvm/lib/Target/TargetAsmInfo.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/TargetAsmInfo.cpp
b/llvm/lib/Target/TargetAsmInfo.cpp
index
02e01be
..
51042da
100644
(file)
--- a/
llvm/lib/Target/TargetAsmInfo.cpp
+++ b/
llvm/lib/Target/TargetAsmInfo.cpp
@@
-364,8
+364,10
@@
TargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV,
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();
}