Move tracing_flag into a common directory (#669)

Intended to combine well with #668, so neither is alone.
This commit is contained in:
Jon Meow
2021-07-21 09:57:54 -07:00
committed by GitHub
parent 08a2d44570
commit f3cbfc04c6
12 changed files with 26 additions and 21 deletions
+12
View File
@@ -0,0 +1,12 @@
# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
# Exceptions. See /LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
package(default_visibility = ["//executable_semantics:__subpackages__"])
cc_library(
name = "tracing_flag",
srcs = ["tracing_flag.cpp"],
hdrs = ["tracing_flag.h"],
visibility = ["//executable_semantics:__subpackages__"],
)
@@ -0,0 +1,11 @@
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#include "executable_semantics/common/tracing_flag.h"
namespace Carbon {
bool tracing_output = false;
} // namespace Carbon
@@ -0,0 +1,15 @@
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#ifndef EXECUTABLE_SEMANTICS_COMMON_TRACING_FLAG_H_
#define EXECUTABLE_SEMANTICS_COMMON_TRACING_FLAG_H_
namespace Carbon {
// Program option to enable/disable tracing.
extern bool tracing_output;
} // namespace Carbon
#endif // EXECUTABLE_SEMANTICS_COMMON_TRACING_FLAG_H_