[PATCH] D20337: [MC] Support symbolic expressions in assembly directives

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 19:37:11 PDT 2016


phosek marked 6 inline comments as done.

================
Comment at: include/llvm/MC/MCStreamer.h:591
@@ +590,3 @@
+  /// \param Loc - The location of the expression for error reporting.
+  virtual void emitSpace(const MCExpr *Size, uint64_t FillValue,
+                         SMLoc Loc = SMLoc());
----------------
niravd wrote:
> Please rename to match casing of other Emit functions. (EmitSpace). 
I'm following the new convention rather than existing casing. I can rename the remaining `Emit*` functions in a separate patch.

================
Comment at: lib/MC/MCAsmStreamer.cpp:828
@@ +827,3 @@
+
+  OS << "\t.space\t";
+  NumBytes->print(OS, MAI);
----------------
niravd wrote:
> Since we cannot guarantee a lack of errors at this point we should emit line directives before and after this so that we preserve the error message location with respect to the original file. 
This should no longer be necessary as the error handling case below has been fixed.

================
Comment at: lib/MC/MCParser/AsmParser.cpp:2749
@@ -2747,2 +2748,3 @@
     Lex();
     if (parseAbsoluteExpression(Val))
+      return false;
----------------
niravd wrote:
> Please decompose this into parseExpression and evaluateAsAbsolute to distinguish expression structure errors (should throw an error here) from value errors which we may defer. 
This was a leftover from the previous version, I've reverted this case to the original version.


Repository:
  rL LLVM

http://reviews.llvm.org/D20337





More information about the llvm-commits mailing list