Kernel: Only include AK/SourceLocation.h if LOCK_DEBUG is enabled

Don't pay the header inclusion cost if we aren't compiling with the
LOCK_DEBUG option enabled.
This commit is contained in:
Brian Gianforcaro 2021-07-31 00:40:22 -07:00 committed by Gunnar Beutner
parent 14c674183b
commit 44e992429f
2 changed files with 6 additions and 2 deletions

View file

@ -4,7 +4,9 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/SourceLocation.h>
#ifdef LOCK_DEBUG
# include <AK/SourceLocation.h>
#endif
#include <Kernel/Debug.h>
#include <Kernel/KSyms.h>
#include <Kernel/Mutex.h>

View file

@ -12,7 +12,9 @@
#include <AK/IntrusiveList.h>
#include <AK/Optional.h>
#include <AK/OwnPtr.h>
#include <AK/SourceLocation.h>
#ifdef LOCK_DEBUG
# include <AK/SourceLocation.h>
#endif
#include <AK/String.h>
#include <AK/Time.h>
#include <AK/Vector.h>