Abstract IR generation of array cookies into the C++ ABI class and
implement ARM array cookies. Also fix a few unfortunate bugs:
- throwing dtors in deletes prevented the allocation from being deleted
- adding the cookie to the new[] size was not being considered for
overflow (and, more seriously, was screwing up the earlier checks)
- deleting an array via a pointer to array of class type was not
causing any destructors to be run and was passing the unadjusted
pointer to the deallocator
- lots of address-space problems, in case anyone wants to support
free store in a variant address space :)
llvm-svn: 112814
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index fc741f8..4f04205 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -731,6 +731,7 @@
public:
CodeGenFunction(CodeGenModule &cgm);
+ CodeGenTypes &getTypes() const { return CGM.getTypes(); }
ASTContext &getContext() const;
CGDebugInfo *getDebugInfo() { return DebugInfo; }