================ @@ -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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits