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 | b83162840fa05e192919b9d174703a889986baa5 (patch) | |
tree | 3a4f6a0b8295ae73ee39a6b5b8f54a834937183f /clang/lib/CodeGen/CGCall.cpp | |
parent | 4217c7ec8176fe4d3c80fb506e836ce1d80ef6b2 (diff) | |
download | bcm5719-llvm-b83162840fa05e192919b9d174703a889986baa5.tar.gz bcm5719-llvm-b83162840fa05e192919b9d174703a889986baa5.zip |
Implement support for the const and pure attributes.
llvm-svn: 57142
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index a1c3c33462d..a246ade82c2 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/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; |