LLVM 24.0.0git
InstrumentationOptions.cpp
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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
10#include "llvm/IR/Function.h"
11#include "llvm/IR/LLVMContext.h"
12#include "llvm/IR/Module.h"
14
15#define OPTIONS_STRUCT_DEFS
16#include "InstrumentationOptions.inc"
17
18using namespace llvm;
19
20LLVM_REGISTER_LIBRARY_OPTIONS(llvm::InstrumentationOptions)
21
22const InstrumentationOptions &
24 return C.getLibraryOptions().get<InstrumentationOptions>();
25}
26
27const InstrumentationOptions &llvm::getInstrumentationOptions(const Module &M) {
28 return getInstrumentationOptions(M.getContext());
29}
30
31const InstrumentationOptions &
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
Module.h This file contains the declarations for the Module class.
#define LLVM_REGISTER_LIBRARY_OPTIONS(T)
Defines the file-scope registration of options struct T for a library that has no initialization func...
#define F(x, y, z)
Definition MD5.cpp:54
This is an important class for using LLVM in a threaded context.
Definition LLVMContext.h:76
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:68
This is an optimization pass for GlobalISel generic memory operations.
const InstrumentationOptions & getInstrumentationOptions(const LLVMContext &C)