Explain FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131952 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2011-05-24 03:10:31 +00:00
parent 10c3e128ef
commit e665798097

View File

@ -225,10 +225,11 @@ void TargetLoweringObjectFileELF::emitPersonalityValue(MCStreamer &Streamer,
static SectionKind
getELFKindForNamedSection(StringRef Name, SectionKind K) {
// FIXME: Why is this here? Codegen is should not be in the business
// of figuring section flags. If the user wrote section(".eh_frame"),
// we should just pass that to MC which will defer to the assembly
// or use its default if producing an object file.
// N.B.: The defaults used in here are no the same ones used in MC.
// We follow gcc, MC follows gas. For example, given ".section .eh_frame",
// both gas and MC will produce a section with no flags. Given
// section(".eh_frame") gcc will produce
// .section .eh_frame,"a",@progbits
if (Name.empty() || Name[0] != '.') return K;
// Some lame default implementation based on some magic section names.