[all-commits] [llvm/llvm-project] 18ead2: AST: Make getEffectiveDeclContext() a member funct...

pcc via All-commits all-commits at lists.llvm.org
Thu Feb 17 11:34:07 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 18ead23385a4e0e6421d658591b1ee6a1c592b53
      https://github.com/llvm/llvm-project/commit/18ead23385a4e0e6421d658591b1ee6a1c592b53
  Author: Peter Collingbourne <peter at pcc.me.uk>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M clang/lib/AST/ItaniumMangle.cpp

  Log Message:
  -----------
  AST: Make getEffectiveDeclContext() a member function of ItaniumMangleContextImpl. NFCI.

In an upcoming change we are going to need to access mangler state
from the getEffectiveDeclContext() function. Therefore, make it a
member function of ItaniumMangleContextImpl. Any callers that are
not currently members of ItaniumMangleContextImpl or CXXNameMangler
are made members of one or the other depending on where they are
called from.

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


  Commit: 82e5f951fd6e6ad6323067d8afcf025fc72d9c33
      https://github.com/llvm/llvm-project/commit/82e5f951fd6e6ad6323067d8afcf025fc72d9c33
  Author: Peter Collingbourne <peter at pcc.me.uk>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/ItaniumMangle.cpp
    M clang/test/CodeGen/aarch64-varargs.c
    M clang/test/CodeGen/arm64-be-hfa-vararg.c
    M clang/test/Headers/stdarg.cpp

  Log Message:
  -----------
  AST: Move __va_list tag back to std conditionally on AArch64.

In post-commit feedback on D104830 Jessica Clarke pointed out that
unconditionally adding __va_list to the std namespace caused namespace
debug info to be emitted in C, which is not only inappropriate but
turned out to confuse the dtrace tool. Therefore, move __va_list back
to std only in C++ so that the correct debug info is generated. We
also considered moving __va_list to the top level unconditionally
but this would contradict the specification and be visible to AST
matchers and such, so make it conditional on the language mode.

To avoid breaking name mangling for __va_list, teach the Itanium
name mangler to always mangle it as if it were in the std namespace
when targeting ARM architectures. This logic is not needed for the
Microsoft name mangler because Microsoft platforms define va_list as
a typedef of char *.

Depends on D116773

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


Compare: https://github.com/llvm/llvm-project/compare/74cacf212bb3...82e5f951fd6e


More information about the All-commits mailing list