summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/FunctionAttrs.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2009-10-23 14:19:52 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2009-10-23 14:19:52 +0000
commit4a142eb28942073eb27a112b5ca1cca3f01beb9c (patch)
tree22cc59e4b240d84c3a5a60531119c4eca914a256 /lib/Transforms/IPO/FunctionAttrs.cpp
parent5cd822fa9bbb9622241e3bf4d7674ed49ccde5b9 (diff)
Diffstat (limited to 'lib/Transforms/IPO/FunctionAttrs.cpp')
-rw-r--r--lib/Transforms/IPO/FunctionAttrs.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Transforms/IPO/FunctionAttrs.cpp b/lib/Transforms/IPO/FunctionAttrs.cpp
index 7edaa7fbef5e4..0701b94c58e88 100644
--- a/lib/Transforms/IPO/FunctionAttrs.cpp
+++ b/lib/Transforms/IPO/FunctionAttrs.cpp
@@ -153,7 +153,7 @@ bool FunctionAttrs::AddReadAttrs(const std::vector<CallGraphNode *> &SCC) {
// Writes memory. Just give up.
return false;
- if (isa<MallocInst>(I))
+ if (isMalloc(I))
// malloc claims not to write memory! PR3754.
return false;
@@ -267,11 +267,8 @@ bool FunctionAttrs::IsFunctionMallocLike(Function *F,
// Check whether the pointer came from an allocation.
case Instruction::Alloca:
- case Instruction::Malloc:
break;
case Instruction::Call:
- if (isMalloc(RVI))
- break;
case Instruction::Invoke: {
CallSite CS(RVI);
if (CS.paramHasAttr(0, Attribute::NoAlias))