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