LLVM  8.0.1
Macros | Functions
WebAssemblyLowerGlobalDtors.cpp File Reference

Lower .global_dtors. More...

#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 dependency graph for WebAssemblyLowerGlobalDtors.cpp:

Go to the source code of this file.

Macros

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

Functions

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

Detailed Description

Lower .global_dtors.

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

Definition in file WebAssemblyLowerGlobalDtors.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

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

Definition at line 32 of file WebAssemblyLowerGlobalDtors.cpp.

Function Documentation

◆ INITIALIZE_PASS()

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