[cfe-commits] [PATCH] Intercept allocation to skim allocated types

Dai MIKURUBE dmikurube at acm.org
Thu Jan 17 20:31:37 PST 2013


  Thanks, Dmitri.  Fixed them all.  I'm updating the patch.

  I didn't add nothrow since I was not sure how to force it...


================
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``
----------------
Dmitri Gribenko wrote:
> s/the/The/
Done.

================
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.
----------------
Dmitri Gribenko wrote:
>   ``<typeinfo>``
Fixed.

================
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"*))
----------------
Dmitri Gribenko wrote:
> Line
> 
>   // CHECK: @_ZN16VirtualDtorKlassD2Ev
> 
> is missing here
Added.

================
Comment at: test/CodeGenCXX/intercept-allocation.cpp:5
@@ +4,3 @@
+// though -fintercept-allocation includes <typeinfo> automatically.
+#include "typeinfo"
+
----------------
Dmitri Gribenko wrote:
> <typeinfo>
> 
> Clang will search in the same directory as the source file.
Done.


http://llvm-reviews.chandlerc.com/D298



More information about the cfe-commits mailing list