summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2008-10-05 23:32:53 +0000
committerAnders Carlsson <andersca@mac.com>2008-10-05 23:32:53 +0000
commitb83162840fa05e192919b9d174703a889986baa5 (patch)
tree3a4f6a0b8295ae73ee39a6b5b8f54a834937183f /clang/lib/CodeGen/CGCall.cpp
parent4217c7ec8176fe4d3c80fb506e836ce1d80ef6b2 (diff)
downloadbcm5719-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.cpp4
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;
OpenPOWER on IntegriCloud