Class PassContextObj#
Defined in File transform.h
Inheritance Relationships#
Base Type#
public ffi::Object
Class Documentation#
-
class PassContextObj : public ffi::Object#
PassContextObj contains the information that a pass can rely on, such as analysis results.
See also
Public Functions
-
PassContextObj() = default#
-
template<typename T>
inline ffi::Optional<T> GetConfig(const std::string &key) const# Get a config value, returning an empty optional when the key is absent.
- Parameters:
key – The config key.
- Template Parameters:
T – The expected value type.
- Throws:
Error – if the key exists but the value does not match T.
-
template<typename TConfig>
inline TConfig GetConfigOrDefault(const std::string &key) const# Get a config object, constructing reflection defaults only when absent.
- Parameters:
key – The config key.
- Template Parameters:
TConfig – The ObjectRef config type with reflection-defined defaults.
- Returns:
The configured object, or a fresh default object for this call.
-
PassContextObj() = default#