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

Duncan Sands baldrick at free.fr
Sat May 5 23:48:23 PDT 2007


Hi Chris,

> +          (CE->getOpcode() == Instruction::BitCast || 
> +           CE->getOpcode() == Instruction::GetElementPtr))
> +        return dyn_cast<GlobalValue>(CE->getOperand(0));

isn't this only correct if all the GEP indices are zero?
By the way, ExtractGlobalVariable in SelectionDAGISel does
the same thing as this function, maybe they should be combined?

Ciao,

Duncan.



More information about the llvm-commits mailing list