LLVM: lib/ExecutionEngine/Orc/Shared/ObjectFormats.cpp Source File

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
13#include "llvm/ExecutionEngine/Orc/Shared/ObjectFormats.h"
14#include "llvm/ADT/STLExtras.h"
15
16namespace llvm {
17namespace orc {
18
19 StringRef ELFEHFrameSectionName = ".eh_frame";
20
21 StringRef ELFInitArrayFuncSectionName = ".init_array";
22 StringRef ELFInitFuncSectionName = ".init";
23 StringRef ELFFiniArrayFuncSectionName = ".fini_array";
24 StringRef ELFFiniFuncSectionName = ".fini";
25 StringRef ELFCtorArrayFuncSectionName = ".ctors";
26 StringRef ELFDtorArrayFuncSectionName = ".dtors";
27
33
34 StringRef ELFThreadBSSSectionName = ".tbss";
35 StringRef ELFThreadDataSectionName = ".tdata";
36
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
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:261
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:1897

Generated on for LLVM by doxygen 1.14.0

AltStyle によって変換されたページ (->オリジナル) /