[Mesa-dev] [PATCH] nv50/codegen/nv50_ir.cpp: #include <typeinfo> on -DNDEBUG.

Christoph Bumiller e0425955 at student.tuwien.ac.at
Mon Dec 31 05:01:12 PST 2012


On 31.12.2012 04:21, Johannes Obermayr wrote:
> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=58879
> ---
> On debug builds it is included:
> nv50_ir.cpp:23 -> nv50_ir.h:33 -> nv50_ir_util.h:33 -> <typeinfo>

And on non-debug builds it's supposed to *not* be included, because they
should work without rtti.
Since when are assertions not removed when NDEBUG is defined ?

> ---
>  src/gallium/drivers/nv50/codegen/nv50_ir.cpp |    4 ++++
>  1 Datei geändert, 4 Zeilen hinzugefügt(+)
>
> diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir.cpp
> index 335e9e0..0bce2ce 100644
> --- a/src/gallium/drivers/nv50/codegen/nv50_ir.cpp
> +++ b/src/gallium/drivers/nv50/codegen/nv50_ir.cpp
> @@ -24,6 +24,10 @@
>  #include "nv50_ir_target.h"
>  #include "nv50_ir_driver.h"
>  
> +#ifdef NDEBUG
> +# include <typeinfo>
> +#endif 
> +
>  extern "C" {
>  #include "nv50/nv50_program.h"
>  #include "nv50/nv50_debug.h"



More information about the mesa-dev mailing list