Make the version of Stmt::operator new that takes ASTContext* call the ASTContext& version in Stmt inline instead of having two out of line functions that both call to the global versions.

llvm-svn: 188648
This commit is contained in:
Craig Topper 2013-08-19 03:11:34 +00:00
parent af71402e7b
commit e691fce6e4
2 changed files with 3 additions and 6 deletions

View File

@ -316,7 +316,9 @@ public:
unsigned alignment = 8);
void* operator new(size_t bytes, const ASTContext* C,
unsigned alignment = 8);
unsigned alignment = 8) {
return operator new(bytes, *C, alignment);
}
void* operator new(size_t bytes, void* mem) throw() {
return mem;

View File

@ -54,11 +54,6 @@ 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;
}