[llvm-commits] [llvm] r93270 - /llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
Devang Patel
dpatel at apple.com
Tue Jan 12 16:53:13 PST 2010
On Jan 12, 2010, at 3:37 PM, Victor Hernandez wrote:
> Author: hernande
> Date: Tue Jan 12 17:37:59 2010
> New Revision: 93270
>
> URL: http://llvm.org/viewvc/llvm-project?rev=93270&view=rev
> Log:
> Make WriteConstants() more robust against stray values in ValueEnumerator's ValueList
Isn't this covering a bug if there are stray values in ValueList ?
-
Devang
>
> Modified:
> llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
>
> Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=93270&r1=93269&r2=93270&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original)
> +++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Tue Jan 12 17:37:59 2010
> @@ -688,6 +688,11 @@
> Record.clear();
> continue;
> }
> +
> + // Ignore all values in ValueList except for Constants.
> + if (V && (isa<Instruction>(V) || isa<Argument>(V)))
> + continue;
> +
> const Constant *C = cast<Constant>(V);
> unsigned Code = -1U;
> unsigned AbbrevToUse = 0;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list