summaryrefslogtreecommitdiffstats
path: root/tools/gn/location.h
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-30 09:27:04 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-30 09:27:04 +0000
commit69a4548e0ab3fbb1531b4df89708bfab9cf0df20 (patch)
treeab77a5fe7f52b55970950374ceb22f4be8e4ea53 /tools/gn/location.h
parentd5f9c7ceb6d59748ad07bb96194b44b516c3c1ad (diff)
downloadchromium_src-69a4548e0ab3fbb1531b4df89708bfab9cf0df20.zip
chromium_src-69a4548e0ab3fbb1531b4df89708bfab9cf0df20.tar.gz
chromium_src-69a4548e0ab3fbb1531b4df89708bfab9cf0df20.tar.bz2
Revert 214254 "Add initial prototype for the GN meta-buildsystem."
It broke the check_licenses step on Android (see http://build.chromium.org/p/chromium.linux/builders/Android%20Builder%20%28dbg%29/builds/39904/steps/check_licenses/logs/stdio): @@@BUILD_STEP check_licenses@@@ > /b/build/slave/Android_Builder__dbg_/build/src/android_webview/tools/webview_licenses.py scan Got LicenseError "missing README.chromium or licenses.py SPECIAL_CASES entry" while scanning tools/gn/secondary/base/third_party/dynamic_annotations Got LicenseError "missing README.chromium or licenses.py SPECIAL_CASES entry" while scanning tools/gn/secondary/third_party/modp_b64 < /b/build/slave/Android_Builder__dbg_/build/src/android_webview/tools/webview_licenses.py scan ERROR: process exited with code 2 @@@STEP_FAILURE@@@ > Add initial prototype for the GN meta-buildsystem. > > This is currently not hooked into the build. To build, add a reference to the > gn.gyp file to build/all.gyp > > R=darin@chromium.org, scottmg@chromium.org > > Review URL: https://codereview.chromium.org/21114002 TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/21084010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214325 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gn/location.h')
-rw-r--r--tools/gn/location.h77
1 files changed, 0 insertions, 77 deletions
diff --git a/tools/gn/location.h b/tools/gn/location.h
deleted file mode 100644
index 2055125..0000000
--- a/tools/gn/location.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef TOOLS_GN_LOCATION_H_
-#define TOOLS_GN_LOCATION_H_
-
-#include <algorithm>
-
-#include "base/logging.h"
-
-class InputFile;
-
-// Represents a place in a source file. Used for error reporting.
-class Location {
- public:
- Location()
- : file_(NULL),
- line_number_(-1),
- char_offset_(-1) {
- }
- Location(const InputFile* file, int line_number, int char_offset)
- : file_(file),
- line_number_(line_number),
- char_offset_(char_offset) {
- }
-
- const InputFile* file() const { return file_; }
- int line_number() const { return line_number_; }
- int char_offset() const { return char_offset_; }
-
- bool operator==(const Location& other) const {
- return other.file_ == file_ &&
- other.line_number_ == line_number_ &&
- other.char_offset_ == char_offset_;
- }
-
- bool operator<(const Location& other) const {
- DCHECK(file_ == other.file_);
- if (line_number_ != other.line_number_)
- return line_number_ < other.line_number_;
- return char_offset_ < other.char_offset_;
- }
-
- private:
- const InputFile* file_; // Null when unset.
- int line_number_; // -1 when unset.
- int char_offset_; // -1 when unset.
-};
-
-// Represents a range in a source file. Used for error reporting.
-// The end is exclusive i.e. [begin, end)
-class LocationRange {
- public:
- LocationRange() {}
- LocationRange(const Location& begin, const Location& end)
- : begin_(begin),
- end_(end) {
- DCHECK(begin_.file() == end_.file());
- }
-
- const Location& begin() const { return begin_; }
- const Location& end() const { return end_; }
-
- LocationRange Union(const LocationRange& other) const {
- DCHECK(begin_.file() == other.begin_.file());
- return LocationRange(
- begin_ < other.begin_ ? begin_ : other.begin_,
- end_ < other.end_ ? other.end_ : end_);
- }
-
- private:
- Location begin_;
- Location end_;
-};
-
-#endif // TOOLS_GN_LOCATION_H_