From 1ef7132e8200c130cd6552d0f6ae88b3fd55f010 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 5 Aug 2015 14:16:44 +0000 Subject: [PATCH] [AA] Use CallSite cast idiom. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244045 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/AliasAnalysis.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Analysis/AliasAnalysis.cpp b/lib/Analysis/AliasAnalysis.cpp index 9e69342e80b..43f6622a994 100644 --- a/lib/Analysis/AliasAnalysis.cpp +++ b/lib/Analysis/AliasAnalysis.cpp @@ -455,9 +455,8 @@ bool AliasAnalysis::canInstructionRangeModRef(const Instruction &I1, /// isNoAliasCall - Return true if this pointer is returned by a noalias /// function. bool llvm::isNoAliasCall(const Value *V) { - if (isa(V) || isa(V)) - return ImmutableCallSite(cast(V)) - .paramHasAttr(0, Attribute::NoAlias); + if (auto CS = ImmutableCallSite(V)) + return CS.paramHasAttr(0, Attribute::NoAlias); return false; } -- 2.34.1