Pass the flag instead of using a global. (#893)

Arguably missed in #769 

Note, this is reminding me we have more class members to rename for `_`, but I felt it's best to use the new naming instead of adding more to clean up.
This commit is contained in:
Jon Meow
2021-10-19 09:16:57 -07:00
committed by GitHub
parent a3eac75a5b
commit a9eed3dbf1
17 changed files with 43 additions and 79 deletions
-7
View File
@@ -38,10 +38,3 @@ cc_library(
"@llvm-project//llvm:Support",
],
)
cc_library(
name = "tracing_flag",
srcs = ["tracing_flag.cpp"],
hdrs = ["tracing_flag.h"],
visibility = ["//executable_semantics:__subpackages__"],
)
@@ -1,11 +0,0 @@
// 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
@@ -1,15 +0,0 @@
// 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_