[PATCH] D24047: [MC] Defer asm errors to post-statement failure

Nirav Dave via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 1 13:35:15 PDT 2016

niravd added inline comments.

Comment at: include/llvm/MC/MCParser/MCAsmParser.h:75
@@ +74,3 @@
+    SmallString<256> Msg;
+    ArrayRef<SMRange> Ranges;
+  } MCPendingError;
rnk wrote:
> This ArrayRef seems like a good way to create dangling references to local ranges arrays. Does any code actually use this functionality? Maybe we can delete it?
It looks like at most we use one SMRange anywhere in the Parser, but we definitely use the Range. Looking at the history it's doesn't look like started out with support for multiple SMRange values but never actually used this feature.

I've changed all references to ArrayRef<SMRange> in the Parsers to a single SMRange. 


More information about the llvm-commits mailing list