LLVM 20.0.0git
Functions
llvm::CodeGenOpt Namespace Reference

Functions

std::optional< CodeGenOptLevelgetLevel (int OL)
 Get the Level identified by the integer OL.
 
std::optional< CodeGenOptLevelparseLevel (char C)
 Parse C as a single digit integer and get matching CodeGenLevel.
 

Function Documentation

◆ getLevel()

std::optional< CodeGenOptLevel > llvm::CodeGenOpt::getLevel ( int  OL)
inline

Get the Level identified by the integer OL.

Returns std::nullopt if OL is invalid.

Definition at line 65 of file CodeGen.h.

Referenced by parseLevel(), and llvm::LTOCodeGenerator::setOptLevel().

◆ parseLevel()

std::optional< CodeGenOptLevel > llvm::CodeGenOpt::parseLevel ( char  C)
inline

Parse C as a single digit integer and get matching CodeGenLevel.

Returns std::nullopt if the input is not a valid optimization level.

Definition at line 73 of file CodeGen.h.

References llvm::CallingConv::C, and getLevel().