mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-02 09:18:36 +02:00
Renames DebugOnlyMacro.h to ConditionalCompilation.h to better reflect its purpose. The header now contains both DEBUGONLY and DIAGNOSTICONLY macros, which are used for conditional compilation based on build configuration. The new name makes the file more general and scalable if future build-scoped macros are added. All includes of DebugOnlyMacro.h have been updated accordingly. Differential Revision: https://phabricator.services.mozilla.com/D243652
43 lines
1.3 KiB
C
43 lines
1.3 KiB
C
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef DOM_QUOTA_CONDITIONALCOMPILATION_H_
|
|
#define DOM_QUOTA_CONDITIONALCOMPILATION_H_
|
|
|
|
#include "mozilla/dom/quota/RemoveParen.h"
|
|
|
|
/**
|
|
* Macros for conditional compilation based on build configuration.
|
|
*
|
|
* These macros are primarily used to inline debug or configuration specific
|
|
* declarations or expressions in a single line without needing explicit #ifdef
|
|
* blocks. This improves readability and avoids code clutter.
|
|
*
|
|
* Current macros include:
|
|
* - DEBUGONLY(expr)
|
|
* - DIAGNOSTICONLY(expr)
|
|
*
|
|
* This header may also include future macros such as:
|
|
* - NIGHTLYONLY(expr)
|
|
* - IF_NIGHTLY(expr)
|
|
*
|
|
* All macros in this file are designed for compile time control over code
|
|
* inclusion and should not introduce runtime behavior.
|
|
*/
|
|
|
|
#ifdef DEBUG
|
|
# define DEBUGONLY(expr) MOZ_REMOVE_PAREN(expr)
|
|
#else
|
|
# define DEBUGONLY(expr)
|
|
#endif
|
|
|
|
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
|
# define DIAGNOSTICONLY(expr) MOZ_REMOVE_PAREN(expr)
|
|
#else
|
|
# define DIAGNOSTICONLY(expr)
|
|
#endif
|
|
|
|
#endif // DOM_QUOTA_CONDITIONALCOMPILATION_H_
|