summaryrefslogtreecommitdiff
path: root/lib/Target/TargetLoweringObjectFile.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-13 08:02:14 +0000
committerChris Lattner <sabre@nondot.org>2010-01-13 08:02:14 +0000
commit4d5f06fbe55ef7dd1d7709407d7b963965c077cf (patch)
tree03a73e1cea01cf50b86c70612f6fffa0b1ecd2c9 /lib/Target/TargetLoweringObjectFile.cpp
parent57d1d936fc41c3482047c9d18dbaa27625df5768 (diff)
downloadllvm-4d5f06fbe55ef7dd1d7709407d7b963965c077cf.tar.gz
llvm-4d5f06fbe55ef7dd1d7709407d7b963965c077cf.tar.bz2
llvm-4d5f06fbe55ef7dd1d7709407d7b963965c077cf.tar.xz
add a fixme, ELF MCSection isn't quite right and weak unnamed globals are broken
on linux (even though they are pointless, they shouldn't ICE). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93308 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r--lib/Target/TargetLoweringObjectFile.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/TargetLoweringObjectFile.cpp b/lib/Target/TargetLoweringObjectFile.cpp
index bd683db893..3ef2b3f3ab 100644
--- a/lib/Target/TargetLoweringObjectFile.cpp
+++ b/lib/Target/TargetLoweringObjectFile.cpp
@@ -578,6 +578,10 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
const char *Prefix = getSectionPrefixForUniqueGlobal(Kind);
SmallString<128> Name;
Name.append(Prefix, Prefix+strlen(Prefix));
+ // FIXME: This will fail for weak globals with no names, this also depends
+ // on the mangling behavior of makeNameProper to mangle the section name
+ // before construction. Instead, this should use getNameWithPrefix on the
+ // global variable and the MCSection printing code should do the mangling.
Mang->makeNameProper(Name, GV->getName());
return getELFSection(Name.str(),