diff options
| author | Nuno Lopes <nunoplopes@sapo.pt> | 2009-12-07 18:30:06 +0000 |
|---|---|---|
| committer | Nuno Lopes <nunoplopes@sapo.pt> | 2009-12-07 18:30:06 +0000 |
| commit | 7251327d751b7bf14c37b15d929f1199a5ab3be7 (patch) | |
| tree | ccecc72379ef08f6b9a6ba34cbe09d43881c762f /clang/lib/CodeGen | |
| parent | 59ae799efa971be18e4b3980280cda2004004590 (diff) | |
| download | bcm5719-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.cpp | 3 |
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; |

