diff options
author | Anders Carlsson <andersca@mac.com> | 2008-10-05 23:32:53 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2008-10-05 23:32:53 +0000 |
commit | 232eb7d33b96ad8f99de3b5ae840421b3a7c6cb7 (patch) | |
tree | 7496307d5faaa35fdb14a3eb580652278501277d /lib/CodeGen/CGCall.cpp | |
parent | d3616a8d0b1506966cb669c19dbfc91bf42c810a (diff) |
Implement support for the const and pure attributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57142 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index a1c3c33462..a246ade82c 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -520,6 +520,10 @@ void CodeGenModule::ConstructAttributeList(const Decl *TargetDecl, FuncAttrs |= llvm::Attribute::NoUnwind; if (TargetDecl->getAttr<NoReturnAttr>()) FuncAttrs |= llvm::Attribute::NoReturn; + if (TargetDecl->getAttr<PureAttr>()) + FuncAttrs |= llvm::Attribute::ReadOnly; + if (TargetDecl->getAttr<ConstAttr>()) + FuncAttrs |= llvm::Attribute::ReadNone; } QualType RetTy = *begin; |