[cfe-commits] [PATCH] Intercept allocation to skim allocated types
Dmitri Gribenko
gribozavr at gmail.com
Thu Jan 17 09:29:18 PST 2013
I don't know if it will actually help with generating faster code, but it is certainly reasonable to require interceptors to be nothrow.
================
Comment at: docs/LanguageExtensions.rst:1635
@@ +1634,3 @@
+
+the function ``__intercept_new__`` is called just after ``operator new`` is
+called, and ``__intercept_delete__`` is called just before ``operator delete``
----------------
s/the/The/
================
Comment at: docs/LanguageExtensions.rst:1648
@@ +1647,3 @@
+Note that RTTI must be enabled (``-frtti``) to intercept allocation.
+<typeinfo> is automatically included if the option ``-fintercept-allocation``
+is specified.
----------------
``<typeinfo>``
================
Comment at: test/CodeGenCXX/intercept-allocation.cpp:5
@@ +4,3 @@
+// though -fintercept-allocation includes <typeinfo> automatically.
+#include "typeinfo"
+
----------------
<typeinfo>
Clang will search in the same directory as the source file.
================
Comment at: test/CodeGenCXX/intercept-allocation.cpp:89
@@ +88,3 @@
+
+VirtualDtorKlass::~VirtualDtorKlass() {
+ // CHECK: %call = call i8* @_Z20__intercept_delete__PvRKSt9type_info(i8* %0, %"class.std::type_info"* bitcast ({ i8*, i8* }* @_ZTI16VirtualDtorKlass to %"class.std::type_info"*))
----------------
Line
// CHECK: @_ZN16VirtualDtorKlassD2Ev
is missing here
http://llvm-reviews.chandlerc.com/D298
More information about the cfe-commits
mailing list