Commit 752396cd authored by Jai Menon's avatar Jai Menon Committed by Scott Cyphers

Codegen: #error out if RTTI is enabled (#327)

parent 15959e73
......@@ -47,7 +47,18 @@
#include "ngraph/log.hpp"
#include "ngraph/util.hpp"
// TODO: Fix leaks
#if defined(__clang__)
#define IS_RTTI_ENABLED __has_feature(cxx_rtti)
#elif defined(__GNUC__)
#define IS_RTTI_ENABLED __GXX_RTTI
#else
// Unknown compiler so assume RTTI is enabled by default
#define IS_RTTI_ENABLED 1
#endif
#if IS_RTTI_ENABLED
#error "This source file interfaces with LLVM and Clang and must be compiled with RTTI disabled"
#endif
// #define USE_CACHE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment