summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/include/clang/AST/Stmt.h3
-rw-r--r--clang/lib/AST/Stmt.cpp5
2 files changed, 8 insertions, 0 deletions
diff --git a/clang/include/clang/AST/Stmt.h b/clang/include/clang/AST/Stmt.h
index 3460c8ead30..bc5dabb5ac9 100644
--- a/clang/include/clang/AST/Stmt.h
+++ b/clang/include/clang/AST/Stmt.h
@@ -315,6 +315,9 @@ public:
void* operator new(size_t bytes, const ASTContext& C,
unsigned alignment = 8);
+ void* operator new(size_t bytes, const ASTContext* C,
+ unsigned alignment = 8);
+
void* operator new(size_t bytes, void* mem) throw() {
return mem;
}
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp
index 9b271c81acd..a80bd87d216 100644
--- a/clang/lib/AST/Stmt.cpp
+++ b/clang/lib/AST/Stmt.cpp
@@ -54,6 +54,11 @@ void *Stmt::operator new(size_t bytes, const ASTContext& C,
return ::operator new(bytes, C, alignment);
}
+void *Stmt::operator new(size_t bytes, const ASTContext* C,
+ unsigned alignment) {
+ return ::operator new(bytes, *C, alignment);
+}
+
const char *Stmt::getStmtClassName() const {
return getStmtInfoTableEntry((StmtClass) StmtBits.sClass).Name;
}
OpenPOWER on IntegriCloud