aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2011-09-19 21:14:35 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2011-09-19 21:14:35 +0000
commit8c25fc584ce27d59df9923f153e8a132dde58d04 (patch)
tree340d3d5522a86b684a28fdd90801c0e74c302264 /lib/CodeGen/CGDecl.cpp
parenta68c4aff8cd3aada697ad36dc6582d0e09b4b0d2 (diff)
OpenCL: introduce support for function scope __local variables
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140068 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r--lib/CodeGen/CGDecl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index 78a1101ce1..46f3f6b177 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -14,6 +14,7 @@
#include "CGDebugInfo.h"
#include "CodeGenFunction.h"
#include "CodeGenModule.h"
+#include "CGOpenCLRuntime.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/CharUnits.h"
#include "clang/AST/Decl.h"
@@ -131,6 +132,8 @@ void CodeGenFunction::EmitVarDecl(const VarDecl &D) {
case SC_PrivateExtern:
// Don't emit it now, allow it to be emitted lazily on its first use.
return;
+ case SC_OpenCLWorkGroupLocal:
+ return CGM.getOpenCLRuntime().EmitWorkGroupLocalVarDecl(*this, D);
}
assert(0 && "Unknown storage class");