47 while (!
Users.empty()) {
49 for (
const Use &U : FnOrCast->
uses()) {
50 const User *FnUser = U.getUser();
52 if ((!
Call->isCallee(&U) || U.get() != GV) &&
53 !
Call->getFunction()->getName().ends_with(
"$exit_thunk")) {
69 if (
G->getName() ==
"llvm.arm64ec.symbolmap")
76 Users.push_back(FnUser);
86 return Asm->OutContext.lookupSymbol(Twine(
"__imp_") + Sym->
getName());
90 const Module *M = Asm->MMI->getModule();
91 std::vector<const MCSymbol *> GFIDsEntries;
92 std::vector<const MCSymbol *> GIATsEntries;
97 if (
F.hasDLLImportStorageClass()) {
98 if (
MCSymbol *impSym = lookupImpSymbol(Asm->getSymbol(&
F))) {
99 GIATsEntries.push_back(impSym);
107 GFIDsEntries.push_back(Asm->getSymbol(&
F));
115 GFIDsEntries.push_back(Asm->getSymbol(&GA));
118 if (GFIDsEntries.empty() && GIATsEntries.empty() && LongjmpTargets.empty())
122 auto &OS = *Asm->OutStreamer;
123 OS.switchSection(Asm->OutContext.getObjectFileInfo()->getGFIDsSection());
124 for (
const MCSymbol *S : GFIDsEntries)
125 OS.emitCOFFSymbolIndex(S);
128 OS.switchSection(Asm->OutContext.getObjectFileInfo()->getGIATsSection());
129 for (
const MCSymbol *S : GIATsEntries) {
130 OS.emitCOFFSymbolIndex(S);
134 OS.switchSection(Asm->OutContext.getObjectFileInfo()->getGLJMPSection());
135 for (
const MCSymbol *S : LongjmpTargets) {
136 OS.emitCOFFSymbolIndex(S);
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
Module.h This file contains the declarations for the Module class.
iv Induction Variable Users
static bool isPossibleIndirectCallTarget(const GlobalValue *GV)
Returns true if this function's address is escaped in a way that might make it an indirect call targe...
This class is intended to be used as a driving class for all asm writers.
LLVM_ABI const GlobalObject * getAliaseeObject() const
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
StringRef getName() const
getName - Get the symbol name.
const std::vector< MCSymbol * > & getLongjmpTargets() const
Returns a reference to a list of symbols immediately following calls to _setjmp in the function.
A Module instance is used to store all the information related to an LLVM module.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
bool starts_with(StringRef Prefix) const
Check if this string starts with the given Prefix.
A Use represents the edge between a Value definition and its users.
LLVM Value Representation.
iterator_range< use_iterator > uses()
WinCFGuard(AsmPrinter *A)
void endModule() override
Emit the Control Flow Guard function ID table.
void endFunction(const MachineFunction *MF) override
Gather post-function debug information.
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
void append_range(Container &C, Range &&R)
Wrapper function to append range R to container C.
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...