1/**
2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#ifndef ASSEMBLER_ASSEMBLY_LABEL_H
17#define ASSEMBLER_ASSEMBLY_LABEL_H
18
19#include <string>
20#include "assembly-file-location.h"
21
22namespace panda::pandasm {
23
24struct Label {
25    std::string name = "";
26    std::optional<FileLocation> file_location;
27
28    Label(std::string s, size_t b_l, size_t b_r, std::string f_c, bool d, size_t l_n)
29        : name(std::move(s)), file_location({f_c, b_l, b_r, l_n, d})
30    {
31    }
32
33    explicit Label(std::string s) : name(std::move(s)) {}
34};
35
36}  // namespace panda::pandasm
37
38#endif  // ASSEMBLER_ASSEMBLY_LABEL_H
39