LLVM 22.0.0git
ObjectFormats.cpp
Go to the documentation of this file.
1//===---------- ObjectFormats.cpp - Object format details for ORC ---------===//
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// ORC-specific object format details.
10//
11//===----------------------------------------------------------------------===//
12
14#include "llvm/ADT/STLExtras.h"
15
16namespace llvm {
17namespace orc {
18
20
27
32};
33
36
39}
40
42 for (StringRef InitSection : ELFInitSectionNames) {
43 StringRef Name = SecName;
44 if (Name.consume_front(InitSection) && (Name.empty() || Name[0] == '.'))
45 return true;
46 }
47 return false;
48}
49
51 return SecName.starts_with(".CRT");
52}
53
54} // namespace orc
55} // namespace llvm
std::string Name
This file contains some templates that are useful if you are working with the STL at all.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:55
bool starts_with(StringRef Prefix) const
Check if this string starts with the given Prefix.
Definition: StringRef.h:269
LLVM_ABI StringRef ELFThreadBSSSectionName
LLVM_ABI StringRef ELFCtorArrayFuncSectionName
LLVM_ABI StringRef ELFFiniFuncSectionName
LLVM_ABI StringRef ELFInitSectionNames[3]
LLVM_ABI StringRef ELFEHFrameSectionName
LLVM_ABI bool isMachOInitializerSection(StringRef SegName, StringRef SecName)
LLVM_ABI StringRef ELFFiniArrayFuncSectionName
LLVM_ABI StringRef MachOInitSectionNames[22]
LLVM_ABI StringRef ELFThreadDataSectionName
LLVM_ABI StringRef ELFInitArrayFuncSectionName
LLVM_ABI bool isCOFFInitializerSection(StringRef Name)
LLVM_ABI bool isELFInitializerSection(StringRef SecName)
LLVM_ABI StringRef ELFInitFuncSectionName
LLVM_ABI StringRef ELFDtorArrayFuncSectionName
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.
Definition: STLExtras.h:1916