[PATCH] D20337: [MC] Support symbolic expressions in assembly directives
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Tue May 24 04:38:46 PDT 2016
rafael added inline comments.
================
Comment at: lib/MC/MCAsmStreamer.cpp:823
@@ +822,3 @@
+ int64_t IntNumBytes;
+ if (NumBytes->evaluateAsAbsolute(IntNumBytes)) {
+ EmitFill(IntNumBytes, Value);
----------------
You don't need to this in the asm streamer. My suggestion would be to just make this a variant of emitFill. We would have one overload that takes a number and one that takes an expression. The implementations would be:
* In the asm streamer: the ones taking an MCExpr does the printing. The other one creates an MCExpr and forwards.
* In the obj streamer: what you have now. Try to evaluate the expr and maybe fail. If it works, forward to the overload that takes a number.
Repository:
rL LLVM
http://reviews.llvm.org/D20337
More information about the llvm-commits
mailing list