Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Unified Diff: tools/gn/ninja_binary_target_writer.cc

Issue 2394163004: GN: Check if targets with precompiled headers use unsupported toolchains. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/ninja_binary_target_writer.h ('k') | tools/gn/source_file_type.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/ninja_binary_target_writer.cc
diff --git a/tools/gn/ninja_binary_target_writer.cc b/tools/gn/ninja_binary_target_writer.cc
index da46149efa6b162180238c97d7414b8fdb06f9b5..ce1c4fc88ba336500501e0968dc17a891889a60c 100644
--- a/tools/gn/ninja_binary_target_writer.cc
+++ b/tools/gn/ninja_binary_target_writer.cc
@@ -26,25 +26,6 @@
#include "tools/gn/substitution_writer.h"
#include "tools/gn/target.h"
-// Represents a set of tool types. Must be first since it is also shared by
-// some helper functions in the anonymous namespace below.
-class NinjaBinaryTargetWriter::SourceFileTypeSet {
- public:
- SourceFileTypeSet() {
- memset(flags_, 0, sizeof(bool) * static_cast<int>(SOURCE_NUMTYPES));
- }
-
- void Set(SourceFileType type) {
- flags_[static_cast<int>(type)] = true;
- }
- bool Get(SourceFileType type) const {
- return flags_[static_cast<int>(type)];
- }
-
- private:
- bool flags_[static_cast<int>(SOURCE_NUMTYPES)];
-};
-
namespace {
// Returns the proper escape options for writing compiler and linker flags.
@@ -203,7 +184,7 @@ void GetPCHOutputFiles(const Target* target,
void AddSourceSetObjectFiles(const Target* source_set,
UniqueVector<OutputFile>* obj_files) {
std::vector<OutputFile> tool_outputs; // Prevent allocation in loop.
- NinjaBinaryTargetWriter::SourceFileTypeSet used_types;
+ SourceFileTypeSet used_types;
// Compute object files for all sources. Only link the first output from
// the tool if there are more than one.
« no previous file with comments | « tools/gn/ninja_binary_target_writer.h ('k') | tools/gn/source_file_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698