[llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp

Chris Lattner clattner at apple.com
Sat Apr 28 12:57:52 PDT 2007


On Apr 28, 2007, at 7:35 AM, Anton Korobeynikov wrote:
> Index: llvm/lib/VMCore/Verifier.cpp
> diff -u llvm/lib/VMCore/Verifier.cpp:1.207 llvm/lib/VMCore/ 
> Verifier.cpp:1.208
> --- llvm/lib/VMCore/Verifier.cpp:1.207	Sat Apr 28 08:45:00 2007
> +++ llvm/lib/VMCore/Verifier.cpp	Sat Apr 28 09:35:41 2007
> @@ -319,6 +319,13 @@
>    Assert1(GA.getType() == GA.getAliasee()->getType(),
>            "Alias and aliasee types should match!", &GA);
>
> +  if (!isa<GlobalValue>(GA.getAliasee())) {
> +    const ConstantExpr *CE = dyn_cast<ConstantExpr>(GA.getAliasee());
> +    Assert1(CE && CE->getOpcode() == Instruction::BitCast,

I'd suggest: && isa<GlobalValue>(CE->getOperand(0))

-Chris

> +            "Aliasee should be either GlobalValue or bitcast of  
> GlobalValue",
> +            &GA);
> +  }
> +
>    visitGlobalValue(GA);
>  }
>
>
>
>
> _______________________________________________
> 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