[llvm-commits] [llvm] r165946 - in /llvm/trunk: include/llvm/MC/MCParser/MCAsmParser.h lib/MC/MCParser/AsmParser.cpp
Eric Christopher
echristo at gmail.com
Mon Oct 15 15:01:42 PDT 2012
On Mon, Oct 15, 2012 at 2:58 PM, Chad Rosier <mcrosier at apple.com> wrote:
>
> On Oct 15, 2012, at 2:54 PM, Eric Christopher <echristo at gmail.com> wrote:
>
>>> + // Free any parsed operands. If parsing ms-style inline assembly it is the
>>> + // responsibility of the caller (i.e., clang) to free the parsed operands.
>>> + if (!ParsingInlineAsm)
>>> + freeParsedOperands();
>>>
>
> If we're not parsing ms-style inline assembly, then we're done matching the instruction and we no longer need the MCAsmParsedOperands; free them now. However, if we're parsing ms-style inline assembly then we need the MCAsmParsedOperands to stick around while the front-end builds the clobbers, inputs, outputs, etc. Once the front-end is done iterating over the MCAsmParsedOperands it must call freeParsedOperands() to free the operands. In the near future I plan on reworking the interface to the front-end, such that this call won't be necessary.
>
So it's something like:
if (not parsing MSInlineAsm) freeParsedOperands();
for that line?
-eric
More information about the llvm-commits
mailing list