[ASTContext] Add a templated convenience wrapper for Allocate.
This brings ASTContext closer to LLVM's Allocator concept. Ideally we
would just derive ASTContext from llvm::AllocatorBase, but that does
not work because ASTContext's allocator is mutable and we allocate using
const ASTContext& everywhere.
llvm-svn: 243972
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp
index 771aeef..46dce32 100644
--- a/clang/lib/AST/Stmt.cpp
+++ b/clang/lib/AST/Stmt.cpp
@@ -724,7 +724,7 @@
}
static StringRef copyIntoContext(const ASTContext &C, StringRef str) {
- return str.copy(C.getAllocator());
+ return str.copy(C);
}
void MSAsmStmt::initialize(const ASTContext &C, StringRef asmstr,