Thanks to visit codestin.com
Credit goes to llvm.org

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 ID, // Sort by ID.
27 Kind, // Sort by kind.
28 Line, // Sort by line.
29 Name, // Sort by name.
30 Offset // Sort by offset.
31};
32
33// Type of function to be called when sorting an object.
34using LVSortValue = int;
36 const LVObject *RHS);
37
38// Get the comparator function, based on the command line options.
40
41// Comparator functions that can be used for sorting.
51
52} // end namespace logicalview
53} // end namespace llvm
54
55#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:94
LLVM_ABI LVSortValue compareOffset(const LVObject *LHS, const LVObject *RHS)
Definition LVSort.cpp:50
LLVM_ABI LVSortValue sortByLine(const LVObject *LHS, const LVObject *RHS)
Definition LVSort.cpp:82
LLVM_ABI LVSortValue compareID(const LVObject *LHS, const LVObject *RHS)
Definition LVSort.cpp:26
LLVM_ABI LVSortValue sortByKind(const LVObject *LHS, const LVObject *RHS)
Definition LVSort.cpp:70
LLVM_ABI LVSortValue compareName(const LVObject *LHS, const LVObject *RHS)
Definition LVSort.cpp:44
LVSortValue(*)(const LVObject *LHS, const LVObject *RHS) LVSortFunction
Definition LVSort.h:35
LLVM_ABI LVSortValue compareRange(const LVObject *LHS, const LVObject *RHS)
Definition LVSort.cpp:56
LLVM_ABI LVSortValue compareLine(const LVObject *LHS, const LVObject *RHS)
Definition LVSort.cpp:38
LLVM_ABI LVSortFunction getSortFunction()
Definition LVSort.cpp:105
LLVM_ABI LVSortValue compareKind(const LVObject *LHS, const LVObject *RHS)
Definition LVSort.cpp:32
This is an optimization pass for GlobalISel generic memory operations.