[PATCH] ARM IAS: support .personalityindex

Renato Golin renato.golin at linaro.org
Thu Jan 9 02:08:52 PST 2014


  Hi Saleem,

  Apart from a few style comments, looks good to me. Please wait for Logan's and Anton's review to commit, though.

  cheers,
  --renato


================
Comment at: lib/Target/ARM/AsmParser/ARMAsmParser.cpp:8454
@@ -8432,1 +8453,3 @@
 bool ARMAsmParser::parseDirectivePersonality(SMLoc L) {
+  bool HasPersonality = UC.hasPersonality();
+
----------------
style nit-pick: this local variable is unnecessary...

================
Comment at: lib/Target/ARM/AsmParser/ARMAsmParser.cpp:8834
@@ +8833,3 @@
+    Parser.eatToEndOfStatement();
+    Error(IndexLoc, "bad personality routine index");
+    return false;
----------------
a better error message would be to show it can't be > 3

================
Comment at: lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.cpp:199
@@ +198,3 @@
+    if (PersonalityIndex == ARM::EHABI::NUM_PERSONALITY_INDEX)
+      PersonalityIndex = Ops.size() <= 3 ? ARM::EHABI::AEABI_UNWIND_CPP_PR0
+                                         : ARM::EHABI::AEABI_UNWIND_CPP_PR1;
----------------
use of parenthesis here would be clearer.

================
Comment at: lib/Target/ARM/AsmParser/ARMAsmParser.cpp:8791
@@ +8790,3 @@
+bool ARMAsmParser::parseDirectivePersonalityIndex(SMLoc L) {
+  bool HasPersonality = UC.hasPersonality();
+
----------------
unnecessary temp variable here, too


http://llvm-reviews.chandlerc.com/D2525



More information about the llvm-commits mailing list