llvm-project/llvm/lib/Passes
Julian Lettner 64902d335c Reland "Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO"
For MachO, lower `@llvm.global_dtors` into `@llvm_global_ctors` with
`__cxa_atexit` calls to avoid emitting the deprecated `__mod_term_func`.

Reuse the existing `WebAssemblyLowerGlobalDtors.cpp` to accomplish this.

Enable fallback to the old behavior via Clang driver flag
(`-fregister-global-dtors-with-atexit`) or llc / code generation flag
(`-lower-global-dtors-via-cxa-atexit`).  This escape hatch will be
removed in the future.

Differential Revision: https://reviews.llvm.org/D121736
2022-03-23 18:36:55 -07:00
..
CMakeLists.txt [NFC] Split up PassBuilder.cpp 2021-09-15 15:30:39 -07:00
OptimizationLevel.cpp [NFC] Split up PassBuilder.cpp 2021-09-15 15:30:39 -07:00
PassBuilder.cpp Reland "Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO" 2022-03-23 18:36:55 -07:00
PassBuilderBindings.cpp [Coroutines] Run coroutine passes by default 2021-07-15 14:33:40 +08:00
PassBuilderPipelines.cpp [PassManager][Coroutine] Run passes under -O0 conditionally and run GlobalDCE 2022-03-23 11:03:26 -07:00
PassPlugin.cpp [NPM] Resolve llvmGetPassPluginInfo to the plugin being loaded 2021-06-30 18:11:28 +01:00
PassRegistry.def Reland "Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO" 2022-03-23 18:36:55 -07:00
StandardInstrumentations.cpp [NFC] Cleanup StandardInstrumentations 2022-03-07 16:24:36 -08:00