Add comments to the constant merging assert.

This commit is contained in:
Bartosz Taudul 2017-09-19 02:19:27 +02:00
parent 36fa5af728
commit 36ecf16d59

View File

@ -47,7 +47,13 @@ Profiler::Profiler()
, m_buffer( new char[TargetFrameSize*3] ) , m_buffer( new char[TargetFrameSize*3] )
, m_bufferOffset( 0 ) , m_bufferOffset( 0 )
{ {
// This check verifies that the string literals from different compilation units are placed at the
// same address by the linker.
// MSVC: make sure "Enable String Pooling" is active (/GF).
// gcc: make sure -fmerge-constants is enabled (it is automatically enabled only in optimized builds).
// clang: seems to be enabled by default.
assert( PointerCheckA == PointerCheckB ); assert( PointerCheckA == PointerCheckB );
assert( !s_instance ); assert( !s_instance );
s_instance = this; s_instance = this;