[PATCH] ARM IAS: support .inst directive

Saleem Abdulrasool compnerd at compnerd.org
Wed Dec 18 21:22:38 PST 2013


  Good point on the diagnostics, Tim.  I've made the diagnostics more appropriate and added an additional test.


================
Comment at: lib/Target/ARM/AsmParser/ARMAsmParser.cpp:8362
@@ +8361,3 @@
+    } else {
+      return Error(Loc, "expected constant expression");
+    }
----------------
Renato Golin wrote:
> Nit pick on style, this should be before the block to avoid extra indentation:
> 
>   const MCConstantExpr *Value = dyn_cast_or_null<MCConstantExpr>(Expr);
>   if (!Value)
>     return Error(Loc, "expected constant expression");
> 
>   switch (Width) {
>   ...
Done

================
Comment at: lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp:386
@@ +385,3 @@
+
+    switch (Suffix) {
+    case '\0':
----------------
Renato Golin wrote:
> Is it possible to put an assert here to make sure we're in the right mode instead of assuming the parser did a good job?
I like more strictness, added an assert(!IsThumb) and assert(IsThumb) before the mapping symbol emission appropriately.


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



More information about the llvm-commits mailing list