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

Side by Side Diff: tools/clang/blink_gc_plugin/NeedsTracing.h

Issue 1385193002: Bisect clang Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 246985 Created 5 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 unified diff | Download patch
« no previous file with comments | « tools/clang/blink_gc_plugin/JsonWriter.h ('k') | tools/clang/blink_gc_plugin/OWNERS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // NeedsTracing is a three-point value ordered by unneeded < unknown < needed.
6 // Unneeded means that the point definitively does not need to be traced.
7
8 #ifndef TOOLS_BLINK_GC_PLUGIN_NEEDS_TRACING_H_
9 #define TOOLS_BLINK_GC_PLUGIN_NEEDS_TRACING_H_
10
11 class NeedsTracing {
12 public:
13 static NeedsTracing Unneeded() { return kUnneeded; }
14 static NeedsTracing Unknown() { return kUnknown; }
15 static NeedsTracing Needed() { return kNeeded; }
16 bool IsUnneeded() { return value_ == kUnneeded; }
17 bool IsUnknown() { return value_ == kUnknown; }
18 bool IsNeeded() { return value_ == kNeeded; }
19 NeedsTracing LUB(const NeedsTracing& other) {
20 return value_ > other.value_ ? value_ : other.value_;
21 }
22 bool operator==(const NeedsTracing& other) {
23 return value_ == other.value_;
24 }
25 private:
26 enum Value { kUnneeded, kUnknown, kNeeded };
27 NeedsTracing(Value value) : value_(value) {}
28 Value value_;
29 };
30
31 #endif // TOOLS_BLINK_GC_PLUGIN_NEEDS_TRACING_H_
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/JsonWriter.h ('k') | tools/clang/blink_gc_plugin/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698