diff options
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
-rw-r--r-- | llvm/lib/IR/Module.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp index 6156edd..b66a99b 100644 --- a/llvm/lib/IR/Module.cpp +++ b/llvm/lib/IR/Module.cpp @@ -671,12 +671,15 @@ void Module::setRtLibUseGOT() { addModuleFlag(ModFlagBehavior::Max, "RtLibUseGOT", 1); } -bool Module::getUwtable() const { - auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("uwtable")); - return Val && (cast<ConstantInt>(Val->getValue())->getZExtValue() > 0); +UWTableKind Module::getUwtable() const { + if (auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("uwtable"))) + return UWTableKind(cast<ConstantInt>(Val->getValue())->getZExtValue()); + return UWTableKind::None; } -void Module::setUwtable() { addModuleFlag(ModFlagBehavior::Max, "uwtable", 1); } +void Module::setUwtable(UWTableKind Kind) { + addModuleFlag(ModFlagBehavior::Max, "uwtable", uint32_t(Kind)); +} FramePointerKind Module::getFramePointer() const { auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("frame-pointer")); |