LLVM 22.0.0git
LinkAllAsmWriterComponents.h
Go to the documentation of this file.
1//===- llvm/Codegen/LinkAllAsmWriterComponents.h ----------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This header file pulls in all assembler writer related passes for tools like
10// llc that need this functionality.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CODEGEN_LINKALLASMWRITERCOMPONENTS_H
15#define LLVM_CODEGEN_LINKALLASMWRITERCOMPONENTS_H
16
17#include "llvm/IR/BuiltinGCs.h"
19
20namespace {
21 struct ForceAsmWriterLinking {
22 ForceAsmWriterLinking() {
23 // We must reference the plug-ins in such a way that compilers will not
24 // delete it all as dead code, even with whole program optimization,
25 // yet is effectively a NO-OP. This is so that globals in the translation
26 // units where these functions are defined are forced to be initialized,
27 // populating various registries.
29 return;
30
33
34 }
35 } ForceAsmWriterLinking; // Force link by creating a global definition.
36}
37
38#endif // LLVM_CODEGEN_LINKALLASMWRITERCOMPONENTS_H
LLVM_ABI void linkErlangGCPrinter()
Creates an erlang-compatible metadata printer.
LLVM_ABI void linkOcamlGCPrinter()
Creates an ocaml-compatible metadata printer.
bool getNonFoldableAlwaysTrue()
Definition AlwaysTrue.h:15