From 1f1fdc070efa8d32d97a51dbffdae466ad83e480 Mon Sep 17 00:00:00 2001 From: Ryan Flynn Date: Sun, 9 Aug 2009 20:07:29 +0000 Subject: map previously ignored __attribute((malloc)) to noalias attribute of llvm function's return llvm-svn: 78541 --- clang/lib/CodeGen/CGCall.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/CodeGen/CGCall.cpp') diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 12d4d9ca252..24d82747a40 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -385,6 +385,8 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, FuncAttrs |= llvm::Attribute::ReadNone; else if (TargetDecl->hasAttr()) FuncAttrs |= llvm::Attribute::ReadOnly; + if (TargetDecl->hasAttr()) + RetAttrs |= llvm::Attribute::NoAlias; } if (CompileOpts.DisableRedZone) -- cgit v1.2.1