1 // go-location.h -- GCC specific Location declaration. -*- C++ -*-
3 // Copyright 2011 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
10 #include "go-system.h"
12 // A location in an input source file.
18 : gcc_loc_(UNKNOWN_LOCATION
)
21 explicit Location(source_location loc
)
27 { return this->gcc_loc_
; }
29 // Temporary hack till error_at and warning_at can deal with a Location.
30 operator source_location() const
31 { return this->gcc_loc_
; }
34 source_location gcc_loc_
;
37 // The Go frontend requires the ability to compare Locations.
40 operator<(Location loca
, Location locb
)
42 return loca
.gcc_location() < locb
.gcc_location();
45 #endif // !defined(GO_LOCATION_H)