Path: blob/main_old/src/compiler/preprocessor/SourceLocation.h
1693 views
//1// Copyright 2012 The ANGLE Project Authors. All rights reserved.2// Use of this source code is governed by a BSD-style license that can be3// found in the LICENSE file.4//56#ifndef COMPILER_PREPROCESSOR_SOURCELOCATION_H_7#define COMPILER_PREPROCESSOR_SOURCELOCATION_H_89namespace angle10{1112namespace pp13{1415struct SourceLocation16{17SourceLocation() : file(0), line(0) {}18SourceLocation(int f, int l) : file(f), line(l) {}1920bool equals(const SourceLocation &other) const21{22return (file == other.file) && (line == other.line);23}2425int file;26int line;27};2829inline bool operator==(const SourceLocation &lhs, const SourceLocation &rhs)30{31return lhs.equals(rhs);32}3334inline bool operator!=(const SourceLocation &lhs, const SourceLocation &rhs)35{36return !lhs.equals(rhs);37}3839} // namespace pp4041} // namespace angle4243#endif // COMPILER_PREPROCESSOR_SOURCELOCATION_H_444546