[llvm-commits] [llvm] r92783 - in /llvm/trunk: lib/AsmParser/LLParser.cpp lib/Bitcode/Reader/BitcodeReader.cpp lib/Bitcode/Writer/BitcodeWriter.cpp lib/Bitcode/Writer/ValueEnumerator.cpp lib/VMCore/AsmWriter.cpp test/Feature/NamedMDNode.ll
Chris Lattner
clattner at apple.com
Fri Jan 8 11:51:15 PST 2010
On Jan 5, 2010, at 1:47 PM, Devang Patel wrote:
> Author: dpatel
> Date: Tue Jan 5 15:47:32 2010
> New Revision: 92783
>
> URL: http://llvm.org/viewvc/llvm-project?rev=92783&view=rev
> Log:
> Allow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!
> 0, !1, null}
looks good, one comment:
> +++ llvm/trunk/lib/AsmParser/LLParser.cpp Tue Jan 5 15:47:32 2010
> @@ -512,6 +512,12 @@
>
> SmallVector<MDNode *, 8> Elts;
> do {
> + // Null is a special case since it is typeless.
> + if (EatIfPresent(lltok::kw_null)) {
> + Elts.push_back(0);
> + continue;
> + }
The parser should not throw this away, it should add a null pointer as
an operand to the NamedMDNode. Printing out IR and reading it back in
should not change it.
-Chris
More information about the llvm-commits
mailing list