[llvm-commits] [llvm] r53869 - in /llvm/trunk/lib/Target/Mips: MipsAsmPrinter.cpp MipsISelLowering.cpp MipsISelLowering.h MipsInstrInfo.td MipsSubtarget.cpp MipsSubtarget.h MipsTargetAsmInfo.cpp
Anton Korobeynikov
asl at math.spbu.ru
Mon Jul 21 13:28:48 PDT 2008
Hi, Bruno
> + const TargetData *TD = getTargetData();
> + const Value *V = dyn_cast<Value>(GV);
You don't need dyn_cast here at all, since GlobalValue is Value.
> + const GlobalVariable *GVA = dyn_cast<GlobalVariable>(V);
And this one seems to be unsafe, GVA will be null, if somebody called
this function with Function*. Why don't use cast then?
--
With best regards, Anton Korobeynikov.
Faculty of Mathematics & Mechanics, Saint Petersburg State University.
More information about the llvm-commits
mailing list