aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2009-12-07 18:30:06 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2009-12-07 18:30:06 +0000
commit079b49550dafc5eefa27c58817e613fd1b1c4309 (patch)
tree3c8f1278ad719053461bff9d5f5daf24d8eca754 /lib/CodeGen/CGCall.cpp
parent7ca7987669fcd14d91b4227a9ddcf7fdd8b1f8c2 (diff)
implement PR5274: mark 'restrict' parameters as noalias
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90778 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 62a5792d27..4856f5404c 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -561,6 +561,9 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
const ABIArgInfo &AI = it->info;
unsigned Attributes = 0;
+ if (ParamType.isRestrictQualified())
+ Attributes |= llvm::Attribute::NoAlias;
+
switch (AI.getKind()) {
case ABIArgInfo::Coerce:
break;