blob: 646a1f0fc72f33aa7f316fd9acd29ab3a80615a6 [file] [log] [blame]
Vladimir Markod8dbc8d2017-09-20 13:37:47 +01001/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ART_COMPILER_DEBUG_SRC_MAP_ELEM_H_
18#define ART_COMPILER_DEBUG_SRC_MAP_ELEM_H_
19
20#include <stdint.h>
21
Vladimir Marko79c4f832022-11-15 17:12:25 +000022#include "base/macros.h"
23
24namespace art HIDDEN {
Vladimir Markod8dbc8d2017-09-20 13:37:47 +010025
26class SrcMapElem {
27 public:
28 uint32_t from_;
29 int32_t to_;
30};
31
32inline bool operator<(const SrcMapElem& lhs, const SrcMapElem& rhs) {
33 if (lhs.from_ != rhs.from_) {
34 return lhs.from_ < rhs.from_;
35 }
36 return lhs.to_ < rhs.to_;
37}
38
39inline bool operator==(const SrcMapElem& lhs, const SrcMapElem& rhs) {
40 return lhs.from_ == rhs.from_ && lhs.to_ == rhs.to_;
41}
42
43} // namespace art
44
45#endif // ART_COMPILER_DEBUG_SRC_MAP_ELEM_H_