![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/include/llvm-10/llvm/IR/ |
Upload File : |
//===-------- llvm/GlobalIFunc.h - GlobalIFunc class ------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// /// /// \brief /// This file contains the declaration of the GlobalIFunc class, which /// represents a single indirect function in the IR. Indirect function uses /// ELF symbol type extension to mark that the address of a declaration should /// be resolved at runtime by calling a resolver function. /// //===----------------------------------------------------------------------===// #ifndef LLVM_IR_GLOBALIFUNC_H #define LLVM_IR_GLOBALIFUNC_H #include "llvm/ADT/ilist_node.h" #include "llvm/IR/GlobalIndirectSymbol.h" #include "llvm/IR/Value.h" namespace llvm { class Twine; class Module; // Traits class for using GlobalIFunc in symbol table in Module. template <typename ValueSubClass> class SymbolTableListTraits; class GlobalIFunc final : public GlobalIndirectSymbol, public ilist_node<GlobalIFunc> { friend class SymbolTableListTraits<GlobalIFunc>; GlobalIFunc(Type *Ty, unsigned AddressSpace, LinkageTypes Linkage, const Twine &Name, Constant *Resolver, Module *Parent); public: GlobalIFunc(const GlobalIFunc &) = delete; GlobalIFunc &operator=(const GlobalIFunc &) = delete; /// If a parent module is specified, the ifunc is automatically inserted into /// the end of the specified module's ifunc list. static GlobalIFunc *create(Type *Ty, unsigned AddressSpace, LinkageTypes Linkage, const Twine &Name, Constant *Resolver, Module *Parent); /// This method unlinks 'this' from the containing module, but does not /// delete it. void removeFromParent(); /// This method unlinks 'this' from the containing module and deletes it. void eraseFromParent(); /// These methods retrieve and set ifunc resolver function. void setResolver(Constant *Resolver) { setIndirectSymbol(Resolver); } const Constant *getResolver() const { return getIndirectSymbol(); } Constant *getResolver() { return getIndirectSymbol(); } // Methods for support type inquiry through isa, cast, and dyn_cast: static bool classof(const Value *V) { return V->getValueID() == Value::GlobalIFuncVal; } }; } // end namespace llvm #endif // LLVM_IR_GLOBALIFUNC_H