47 while (!
Users.empty()) {
49 for (
const Use &U : FnOrCast->
uses()) {
50 const User *FnUser = U.getUser();
51 if (isa<BlockAddress>(FnUser))
53 if (
const auto *Call = dyn_cast<CallBase>(FnUser)) {
54 if (!Call->isCallee(&U))
56 }
else if (isa<Instruction>(FnUser)) {
61 }
else if (
const auto *
C = dyn_cast<Constant>(FnUser)) {
67 if (
C->stripPointerCasts() ==
F)
68 Users.push_back(FnUser);
78 if (
Sym->getName().startswith(
"__imp_"))
85 std::vector<const MCSymbol *> GFIDsEntries;
86 std::vector<const MCSymbol *> GIATsEntries;
91 if (
F.hasDLLImportStorageClass()) {
93 GIATsEntries.push_back(impSym);
105 if (GFIDsEntries.empty() && GIATsEntries.empty() && LongjmpTargets.empty())
111 for (
const MCSymbol *S : GFIDsEntries)
112 OS.emitCOFFSymbolIndex(S);
116 for (
const MCSymbol *S : GIATsEntries) {
117 OS.emitCOFFSymbolIndex(S);
122 for (
const MCSymbol *S : LongjmpTargets) {
123 OS.emitCOFFSymbolIndex(S);
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
This file contains the declarations for the subclasses of Constant, which represent the different fla...
iv Induction Variable Users
static bool isPossibleIndirectCallTarget(const Function *F)
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.
MCSymbol * getSymbol(const GlobalValue *GV) const
MachineModuleInfo * MMI
This is a pointer to the current MachineModuleInfo.
MCContext & OutContext
This is the context for the output file that we are streaming.
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
const MCObjectFileInfo * getObjectFileInfo() const
MCSymbol * lookupSymbol(const Twine &Name) const
Get the symbol for Name, or null.
MCSection * getGFIDsSection() const
MCSection * getGLJMPSection() const
MCSection * getGIATsSection() const
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
const std::vector< MCSymbol * > & getLongjmpTargets() const
Returns a reference to a list of symbols immediately following calls to _setjmp in the function.
const Module * getModule() const
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.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
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.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
void append_range(Container &C, Range &&R)
Wrapper function to append a range to a container.