[llvm-commits] [llvm] r118822 - /llvm/trunk/lib/Analysis/Lint.cpp
Dan Gohman
gohman at apple.com
Thu Nov 11 11:23:51 PST 2010
Author: djg
Date: Thu Nov 11 13:23:51 2010
New Revision: 118822
URL: http://llvm.org/viewvc/llvm-project?rev=118822&view=rev
Log:
Avoid calling alias on non-pointer values.
Modified:
llvm/trunk/lib/Analysis/Lint.cpp
Modified: llvm/trunk/lib/Analysis/Lint.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/Lint.cpp?rev=118822&r1=118821&r2=118822&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/Lint.cpp (original)
+++ llvm/trunk/lib/Analysis/Lint.cpp Thu Nov 11 13:23:51 2010
@@ -231,10 +231,11 @@
// to do. Known partial overlap is not distinguished from the case
// where nothing is known.
if (Formal->hasNoAliasAttr() && Actual->getType()->isPointerTy())
- for (CallSite::arg_iterator BI = CS.arg_begin(); BI != AE; ++BI) {
- Assert1(AI == BI || AA->alias(*AI, *BI) != AliasAnalysis::MustAlias,
+ for (CallSite::arg_iterator BI = CS.arg_begin(); BI != AE; ++BI)
+ Assert1(AI == BI ||
+ !(*BI)->getType()->isPointerTy() ||
+ AA->alias(*AI, *BI) != AliasAnalysis::MustAlias,
"Unusual: noalias argument aliases another argument", &I);
- }
// Check that an sret argument points to valid memory.
if (Formal->hasStructRetAttr() && Actual->getType()->isPointerTy()) {
More information about the llvm-commits
mailing list