[all-commits] [llvm/llvm-project] 8ff44e: [IRGen] Fix an assert when __attribute__((used)) i...

Erik Pilkington via All-commits all-commits at lists.llvm.org
Wed Sep 2 09:19:39 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8ff44e644bb70dfb8decc397a42679df6e6f8ba1
      https://github.com/llvm/llvm-project/commit/8ff44e644bb70dfb8decc397a42679df6e6f8ba1
  Author: Erik Pilkington <erik.pilkington at gmail.com>
  Date:   2020-09-02 (Wed, 02 Sep 2020)

  Changed paths:
    M clang/lib/CodeGen/CodeGenModule.cpp
    A clang/test/CodeGenObjC/attr-used-on-method.m

  Log Message:
  -----------
  [IRGen] Fix an assert when __attribute__((used)) is used on an ObjC method

This assert doesn't really make sense for functions in general, since they
start life as declarations, and there isn't really any reason to require them
to be defined before attributes are applied to them.

rdar://67895846


  Commit: d46f2c51e4c849683434bb5a0fb6164957474b8f
      https://github.com/llvm/llvm-project/commit/d46f2c51e4c849683434bb5a0fb6164957474b8f
  Author: Erik Pilkington <erik.pilkington at gmail.com>
  Date:   2020-09-02 (Wed, 02 Sep 2020)

  Changed paths:
    M clang/include/clang/Basic/LangOptions.def
    M clang/include/clang/Driver/Options.td
    M clang/lib/AST/Decl.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Driver/ToolChains/Darwin.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    A clang/test/CodeGenCXX/visibility-inlines-hidden-static-local-var.cpp
    M clang/test/Driver/darwin-objc-options.m

  Log Message:
  -----------
  Make -fvisibility-inlines-hidden apply to static local variables in inline functions on Darwin

This effectively disables r340386 on Darwin, and provides a command line flag
to opt into/out of this behaviour. This change is needed to compile certain
Apple headers correctly.

rdar://47688592

Differential revision: https://reviews.llvm.org/D86881


Compare: https://github.com/llvm/llvm-project/compare/ddd48cdba690...d46f2c51e4c8


More information about the All-commits mailing list