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

Unified Diff: tools/gn/source_file_type.h

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.cc ('k') | tools/gn/target.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/source_file_type.h
diff --git a/tools/gn/source_file_type.h b/tools/gn/source_file_type.h
index c43b4324443e5184709390fd5bfb658fc6a5edfd..af71d1c99ebb139322a8eeefd0767ce32901b8b8 100644
--- a/tools/gn/source_file_type.h
+++ b/tools/gn/source_file_type.h
@@ -28,4 +28,19 @@ enum SourceFileType {
SourceFileType GetSourceFileType(const SourceFile& file);
+// Represents a set of tool types.
+class SourceFileTypeSet {
+ public:
+ SourceFileTypeSet() {
+ for (auto& flag : flags_)
+ flag = 0;
+ }
+
+ 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)];
+};
+
#endif // TOOLS_GN_SOURCE_FILE_TYPE_H_
« no previous file with comments | « tools/gn/ninja_binary_target_writer.cc ('k') | tools/gn/target.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698