Use dyn_cast instead of isa+cast.
llvm-svn: 124404
This commit is contained in:
parent
8688e078ae
commit
5a37e950e1
@ -460,9 +460,8 @@ bool FunctionComparator::Enumerate(const Value *V1, const Value *V2) {
|
|||||||
if (V1 == F2 && V2 == F1)
|
if (V1 == F2 && V2 == F1)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (isa<Constant>(V1)) {
|
if (Constant *C1 = dyn_cast<Constant>(V1)) {
|
||||||
if (V1 == V2) return true;
|
if (V1 == V2) return true;
|
||||||
const Constant *C1 = cast<Constant>(V1);
|
|
||||||
const Constant *C2 = dyn_cast<Constant>(V2);
|
const Constant *C2 = dyn_cast<Constant>(V2);
|
||||||
if (!C2) return false;
|
if (!C2) return false;
|
||||||
// TODO: constant expressions with GEP or references to F1 or F2.
|
// TODO: constant expressions with GEP or references to F1 or F2.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user