diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp index 39f232e3e56..eba21314173 100644 --- a/lib/Analysis/BasicAliasAnalysis.cpp +++ b/lib/Analysis/BasicAliasAnalysis.cpp @@ -311,25 +311,25 @@ BasicAliasAnalysis::alias(const Value *V1, unsigned V1Size, // Pointing at a discernible object? if (O1) { if (O2) { - if (isa(O1)) { + if (const Argument *O1Arg = dyn_cast(O1)) { // Incoming argument cannot alias locally allocated object! if (isa(O2)) return NoAlias; // If they are two different objects, and one is a noalias argument // then they do not alias. - if (O1 != O2 && isNoAliasArgument(cast(O1))) + if (O1 != O2 && isNoAliasArgument(O1Arg)) return NoAlias; // Otherwise, nothing is known... } - if (isa(O2)) { + if (const Argument *O2Arg = dyn_cast(O2)) { // Incoming argument cannot alias locally allocated object! if (isa(O1)) return NoAlias; // If they are two different objects, and one is a noalias argument // then they do not alias. - if (O1 != O2 && isNoAliasArgument(cast(O2))) + if (O1 != O2 && isNoAliasArgument(O2Arg)) return NoAlias; // Otherwise, nothing is known...