[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)
Ulrich Weigand via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 14 04:26:23 PST 2023
================
@@ -1026,6 +1030,78 @@ void SystemZAsmPrinter::emitADASection() {
OutStreamer->popSection();
}
+static uint32_t getProductVersion(Module &M) {
+ if (auto *VersionVal = cast_or_null<ConstantAsMetadata>(
+ M.getModuleFlag("zos_product_major_version")))
+ return cast<ConstantInt>(VersionVal->getValue())->getZExtValue();
----------------
uweigand wrote:
I think instead of these two casts, these days you're supposed to use the new `mdconst` interface, e.g. like
```
if (auto *VersionVal = mdconst::extract_or_null<ConstantInt>(
M.getModuleFlag("zos_product_major_version"))
```
https://github.com/llvm/llvm-project/pull/68926
More information about the llvm-commits
mailing list