LLVM 20.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
16namespace llvm {
17namespace logicalview {
18
19class LVObject;
20
21// Object Sorting Mode.
22enum class LVSortMode {
23 None = 0, // No given sort.
24 Kind, // Sort by kind.
25 Line, // Sort by line.
26 Name, // Sort by name.
27 Offset // Sort by offset.
28};
29
30// Type of function to be called when sorting an object.
31using LVSortValue = int;
33 const LVObject *RHS);
34
35// Get the comparator function, based on the command line options.
37
38// Comparator functions that can be used for sorting.
47
48} // end namespace logicalview
49} // end namespace llvm
50
51#endif // LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVSORT_H
Value * RHS
Value * LHS
LVSortValue sortByName(const LVObject *LHS, const LVObject *RHS)
Definition: LVSort.cpp:88
LVSortValue compareOffset(const LVObject *LHS, const LVObject *RHS)
Definition: LVSort.cpp:44
LVSortValue sortByLine(const LVObject *LHS, const LVObject *RHS)
Definition: LVSort.cpp:76
LVSortValue sortByKind(const LVObject *LHS, const LVObject *RHS)
Definition: LVSort.cpp:64
LVSortValue compareName(const LVObject *LHS, const LVObject *RHS)
Definition: LVSort.cpp:38
LVSortValue compareRange(const LVObject *LHS, const LVObject *RHS)
Definition: LVSort.cpp:50
LVSortValue compareLine(const LVObject *LHS, const LVObject *RHS)
Definition: LVSort.cpp:32
LVSortFunction getSortFunction()
Definition: LVSort.cpp:99
LVSortValue compareKind(const LVObject *LHS, const LVObject *RHS)
Definition: LVSort.cpp:26
LVSortValue(*)(const LVObject *LHS, const LVObject *RHS) LVSortFunction
Definition: LVSort.h:33
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18