summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
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
commit7251327d751b7bf14c37b15d929f1199a5ab3be7 (patch)
treeccecc72379ef08f6b9a6ba34cbe09d43881c762f /clang/lib/CodeGen
parent59ae799efa971be18e4b3980280cda2004004590 (diff)
downloadbcm5719-llvm-7251327d751b7bf14c37b15d929f1199a5ab3be7.tar.gz
bcm5719-llvm-7251327d751b7bf14c37b15d929f1199a5ab3be7.zip
implement PR5274: mark 'restrict' parameters as noalias
llvm-svn: 90778
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 62a5792d27d..4856f5404c1 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud