[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)
Ulrich Weigand via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 22 06:04:06 PST 2023
================
@@ -1026,6 +1030,71 @@ void SystemZAsmPrinter::emitADASection() {
OutStreamer->popSection();
}
+static uint32_t getProductVersion(Module &M) {
+ if (auto *VersionVal = mdconst::extract_or_null<ConstantInt>(
+ M.getModuleFlag("zos_product_major_version")))
+ return VersionVal->getValue().getZExtValue();
----------------
uweigand wrote:
I don't think you need the separate `getValue()` here any more.
Also, you should be making the change to use `mdconst` not only in this one place, but in all places where you use `getModuleFlag` to retrieve an integer constant.
https://github.com/llvm/llvm-project/pull/68926
More information about the cfe-commits
mailing list