[PATCH] D144190: [AIX][clang] Storage Locations for Constant Pointers

Qiongsi Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 16 07:30:01 PST 2023


qiongsiwu1 created this revision.
qiongsiwu1 added a project: clang.
Herald added subscribers: ormris, kbarton, nemanjai.
Herald added a project: All.
qiongsiwu1 requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.

This patch adds clang options `-mroptr` and `-mno-roptr` to specify storage locations for constant pointers on AIX.

When the `-mroptr` option is in effect, constant pointers, virtual function tables, and virtual type tables are placed in read-only storage. When the `-mno-roptr` option is in effect, pointers, virtual function tables, and virtual type tables are placed are placed in read/write storage.

This patch depends on https://reviews.llvm.org/D144189.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144190

Files:
  clang/docs/ReleaseNotes.rst
  clang/include/clang/Basic/CodeGenOptions.def
  clang/include/clang/Basic/DiagnosticDriverKinds.td
  clang/include/clang/Driver/Options.td
  clang/lib/CodeGen/BackendUtil.cpp
  clang/lib/Driver/ToolChains/AIX.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/test/CodeGen/PowerPC/aix-roptr.c
  clang/test/Driver/ppc-roptr.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144190.498013.patch
Type: text/x-patch
Size: 8612 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230216/915d4b62/attachment.bin>


More information about the cfe-commits mailing list