LLVM 22.0.0git
LVSort.h
Go to the documentation of this file.
1//===-- LVSort.h ------------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines the sort algorithms.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVSORT_H
14#define LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVSORT_H
15
17
18namespace llvm {
19namespace logicalview {
20
21class LVObject;
22
23// Object Sorting Mode.
24enum class LVSortMode {
25 None = 0, // No given sort.
26 Kind, // Sort by kind.
27 Line, // Sort by line.
28 Name, // Sort by name.
29 Offset // Sort by offset.
30};
31
32// Type of function to be called when sorting an object.
33using LVSortValue = int;
35 const LVObject *RHS);
36
37// Get the comparator function, based on the command line options.
39
40// Comparator functions that can be used for sorting.
49
50} // end namespace logicalview
51} // end namespace llvm
52
53#endif // LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVSORT_H
#define LLVM_ABI
Definition: Compiler.h:213
Value * RHS
Value * LHS
LLVM_ABI LVSortValue sortByName(const LVObject *LHS, const LVObject *RHS)
Definition: LVSort.cpp:88
LLVM_ABI LVSortValue compareOffset(const LVObject *LHS, const LVObject *RHS)
Definition: LVSort.cpp:44
LLVM_ABI LVSortValue sortByLine(const LVObject *LHS, const LVObject *RHS)
Definition: LVSort.cpp:76
LLVM_ABI LVSortValue sortByKind(const LVObject *LHS, const LVObject *RHS)
Definition: LVSort.cpp:64
LLVM_ABI LVSortValue compareName(const LVObject *LHS, const LVObject *RHS)
Definition: LVSort.cpp:38
LLVM_ABI LVSortValue compareRange(const LVObject *LHS, const LVObject *RHS)
Definition: LVSort.cpp:50
LLVM_ABI LVSortValue compareLine(const LVObject *LHS, const LVObject *RHS)
Definition: LVSort.cpp:32
LLVM_ABI LVSortFunction getSortFunction()
Definition: LVSort.cpp:99
LLVM_ABI LVSortValue compareKind(const LVObject *LHS, const LVObject *RHS)
Definition: LVSort.cpp:26
LVSortValue(*)(const LVObject *LHS, const LVObject *RHS) LVSortFunction
Definition: LVSort.h:35
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18