[PATCH] ARM IAS: support .personalityindex
Logan Chien
tzuhsiang.chien at gmail.com
Tue Jan 14 05:43:38 PST 2014
================
Comment at: lib/Target/ARM/AsmParser/ARMAsmParser.cpp:8454
@@ -8432,1 +8453,3 @@
bool ARMAsmParser::parseDirectivePersonality(SMLoc L) {
+ bool HasPersonality = UC.hasPersonality();
+
----------------
Renato Golin wrote:
> style nit-pick: this local variable is unnecessary...
It seems to be necessary because UC will be changed in the next line. To make this clear, I would suggest either rename this variable to HasOtherPersonalityDirective or simply move the check in 8473 upward.
================
Comment at: lib/Target/ARM/AsmParser/ARMAsmParser.cpp:8832
@@ +8831,3 @@
+ }
+ if (CE->getValue() < 0 || CE->getValue() >= 3) {
+ Parser.eatToEndOfStatement();
----------------
I would prefer to use:
CE->getValue() < ARM::AEABI::NUM_PERSONALITY_INDEX
================
Comment at: lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp:1146
@@ +1145,3 @@
+void ARMELFStreamer::emitPersonalityIndex(unsigned Index) {
+ assert(Index < NUM_PERSONALITY_INDEX && "invalid index");
+ PersonalityIndex = Index;
----------------
It seems that you will need ARM::EHABI:: here.
http://llvm-reviews.chandlerc.com/D2525
More information about the llvm-commits
mailing list