LLVM 24.0.0git
CodeGenOptions.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
9#include "CodeGenOptions.h"
11#include "llvm/IR/Function.h"
12#include "llvm/IR/LLVMContext.h"
13#include "llvm/IR/Module.h"
15
16#define OPTIONS_STRUCT_DEFS
17#include "CodeGenOptions.inc"
18
19using namespace llvm;
20
22
23const CodeGenOptions &llvm::getCodeGenOptions(const LLVMContext &C) {
24 return C.getLibraryOptions().get<CodeGenOptions>();
25}
26
27const CodeGenOptions &llvm::getCodeGenOptions(const Module &M) {
28 return getCodeGenOptions(M.getContext());
29}
30
31const CodeGenOptions &llvm::getCodeGenOptions(const MachineFunction &MF) {
33}
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static llvm::opt::RegisterLibraryOptions< llvm::CGDataOptions > Registration
Module.h This file contains the declarations for the Module class.
LLVMContext & getContext() const
getContext - Return a reference to the LLVMContext associated with this function.
Definition Function.cpp:352
This is an important class for using LLVM in a threaded context.
Definition LLVMContext.h:76
Function & getFunction()
Return the LLVM function that this machine code represents.
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:68
Registers T::Global with cl::ParseCommandLineOptions.
This is an optimization pass for GlobalISel generic memory operations.
const CodeGenOptions & getCodeGenOptions(const LLVMContext &C)