aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2015-02-26 10:27:34 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2015-02-26 10:27:34 +0000
commit8cbe0a6b626eb7e158f339c20f4af74996d9d4ac (patch)
tree0bb66795e605d91d469f53a0a6076163f3c9b3e3 /clang/lib/CodeGen/CodeGenFunction.h
parenta42de763ac54f79ce2f9abc8330e107275b2afc9 (diff)
downloadllvm-8cbe0a6b626eb7e158f339c20f4af74996d9d4ac.zip
llvm-8cbe0a6b626eb7e158f339c20f4af74996d9d4ac.tar.gz
llvm-8cbe0a6b626eb7e158f339c20f4af74996d9d4ac.tar.bz2
[OPENMP] Fixed codegen for directives without function outlining.
Fixed crash on codegen for directives like 'omp for', 'omp single' etc. inside of the 'omp parallel', 'omp task' etc. regions. llvm-svn: 230621
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 7571332..c0368aa 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -194,22 +194,22 @@ public:
void setContextValue(llvm::Value *V) { ThisValue = V; }
// \brief Retrieve the value of the context parameter.
- llvm::Value *getContextValue() const { return ThisValue; }
+ virtual llvm::Value *getContextValue() const { return ThisValue; }
/// \brief Lookup the captured field decl for a variable.
- const FieldDecl *lookup(const VarDecl *VD) const {
+ virtual const FieldDecl *lookup(const VarDecl *VD) const {
return CaptureFields.lookup(VD);
}
- bool isCXXThisExprCaptured() const { return CXXThisFieldDecl != nullptr; }
- FieldDecl *getThisFieldDecl() const { return CXXThisFieldDecl; }
+ bool isCXXThisExprCaptured() const { return getThisFieldDecl() != nullptr; }
+ virtual FieldDecl *getThisFieldDecl() const { return CXXThisFieldDecl; }
static bool classof(const CGCapturedStmtInfo *) {
return true;
}
/// \brief Emit the captured statement body.
- virtual void EmitBody(CodeGenFunction &CGF, Stmt *S) {
+ virtual void EmitBody(CodeGenFunction &CGF, const Stmt *S) {
RegionCounter Cnt = CGF.getPGORegionCounter(S);
Cnt.beginRegion(CGF.Builder);
CGF.EmitStmt(S);