LLVM  14.0.0git
Macros | Functions
WebAssemblyLowerGlobalDtors.cpp File Reference
#include "WebAssembly.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
#include <map>
Include dependency graph for WebAssemblyLowerGlobalDtors.cpp:

Go to the source code of this file.


#define DEBUG_TYPE   "wasm-lower-global-dtors"


 INITIALIZE_PASS (LowerGlobalDtors, DEBUG_TYPE, "Lower @llvm.global_dtors for WebAssembly", false, false) ModulePass *llvm

Detailed Description

Lower @llvm.global_dtors.

WebAssembly doesn't have a builtin way to invoke static destructors. Implement @llvm.global_dtors by creating wrapper functions that are registered in @llvm.global_ctors and which contain a call to __cxa_atexit to register their destructor functions.

Definition in file WebAssemblyLowerGlobalDtors.cpp.

Macro Definition Documentation


#define DEBUG_TYPE   "wasm-lower-global-dtors"

Definition at line 33 of file WebAssemblyLowerGlobalDtors.cpp.

Function Documentation


INITIALIZE_PASS ( LowerGlobalDtors  ,
"Lower @llvm.global_dtors for WebAssembly"  ,
false  ,

Definition at line 55 of file WebAssemblyLowerGlobalDtors.cpp.