add a fixme, ELF MCSection isn't quite right and weak unnamed globals are broken
authorChris Lattner <sabre@nondot.org>
Wed, 13 Jan 2010 08:02:14 +0000 (08:02 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 13 Jan 2010 08:02:14 +0000 (08:02 +0000)
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

lib/Target/TargetLoweringObjectFile.cpp

index bd683db89321ae8dbfa1dba8ad071c4c5d2ac069..3ef2b3f3abb750c66066bbc0d6975e50d1acd25b 100644 (file)
@@ -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(),