[llvm-commits] Proof of concept patch for unifying the .s/ELF emission of .ARM.attributes
Rafael Espindola
espindola at google.com
Tue Oct 19 08:01:26 PDT 2010
> Okay, I just committed the convert (all numbers from elf-dump are now
> hex) as r116753.
I noticed that was reverted. The first thing is to fix it and commit
again. Once it is in:
+
+ case ELF::SHT_ARM_EXIDX:
+ case ELF::SHT_ARM_PREEMPTMAP:
+ assert(0 && "FIXME: sh_type value not supported!");
+ break;
+
+ case ELF::SHT_ARM_ATTRIBUTES:
+ break;
+
+ case ELF::SHT_ARM_DEBUGOVERLAY:
+ case ELF::SHT_ARM_OVERLAYSECTION:
default:
assert(0 && "FIXME: sh_type value not supported!");
break;
The two new cases are exactly like the default. Same for the last two
new one. Can you just use the default? Another option is to list every
enum value and remove the default so that we get a warning if one is
missing. Not sure if there are two many for this to be practical.
It still looks like you are creating more class members than you need
to. Take headFragment for example. It is only assigned in one place in
the code, emitARMAttributeSection. emitARMAttributeSection is only
called once in emitAttributes. emitARMAttributeSection can "return"
the headFragment and that can then be passed to fixupAttrSizes.
Cheers,
--
Rafael Ávila de Espíndola
More information about the llvm-commits
mailing list