You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
542 B
40 lines
542 B
#pragma once
|
|
|
|
#include <iostream>
|
|
|
|
// The same as assert, but expression is always evaluated and result returned
|
|
#define CHECK(expr) (assert(expr), expr)
|
|
|
|
#if !defined(NDEBUG) // Debug
|
|
|
|
namespace dev
|
|
{
|
|
namespace evmjit
|
|
{
|
|
|
|
std::ostream& getLogStream(char const* _channel);
|
|
|
|
}
|
|
}
|
|
|
|
#define DLOG(CHANNEL) ::dev::evmjit::getLogStream(#CHANNEL)
|
|
|
|
#else // Release
|
|
|
|
namespace dev
|
|
{
|
|
namespace evmjit
|
|
{
|
|
|
|
struct Voider
|
|
{
|
|
void operator=(std::ostream const&) {}
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
|
|
#define DLOG(CHANNEL) true ? (void)0 : ::dev::evmjit::Voider{} = std::cerr
|
|
|
|
#endif
|
|
|