[all-commits] [llvm/llvm-project] e42021: [Clang][-fvisibility-from-dllstorageclass] Set DSO...

bd1976bris via All-commits all-commits at lists.llvm.org
Mon Nov 23 16:33:45 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e42021d5cc25a8dc7e3efac1e7007cc0c1a7b2bd
      https://github.com/llvm/llvm-project/commit/e42021d5cc25a8dc7e3efac1e7007cc0c1a7b2bd
  Author: Ben Dunbobbin <Ben.Dunbobbin at sony.com>
  Date:   2020-11-24 (Tue, 24 Nov 2020)

  Changed paths:
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/test/CodeGenCXX/visibility-dllstorageclass.cpp

  Log Message:
  -----------
  [Clang][-fvisibility-from-dllstorageclass] Set DSO Locality from final visibility

Ensure that the DSO Locality of the globals in the IR is derived from
their final visibility when using -fvisibility-from-dllstorageclass.

To accomplish this we reset the DSO locality of globals (before
setting their visibility from their dllstorageclass) at the end of
IRGen in Clang. This removes any effects that visibility options or
annotations may have had on the DSO locality.

The resulting DSO locality of the globals will be pessimistic
w.r.t. to the normal compiler IRGen.

Differential Revision: https://reviews.llvm.org/D91779




More information about the All-commits mailing list