[all-commits] [llvm/llvm-project] 9fbf5c: [clang][modules] Partially revert 48d0eb518 to fix...

Ben Langmuir via All-commits all-commits at lists.llvm.org
Wed Jan 22 16:25:17 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9fbf5cfebcd770fbe0e453f36ee7c74809339f18
      https://github.com/llvm/llvm-project/commit/9fbf5cfebcd770fbe0e453f36ee7c74809339f18
  Author: Ben Langmuir <blangmuir at apple.com>
  Date:   2025-01-22 (Wed, 22 Jan 2025)

  Changed paths:
    M clang/include/clang/CodeGen/BackendUtil.h
    M clang/lib/CodeGen/BackendUtil.cpp
    M clang/lib/CodeGen/CodeGenAction.cpp
    M clang/lib/CodeGen/ObjectFilePCHContainerWriter.cpp
    A clang/test/Modules/gmodules-codegenopts.c

  Log Message:
  -----------
  [clang][modules] Partially revert 48d0eb518 to fix -gmodules output (#124003)

With the changes in 48d0eb518, the CodeGenOptions used to emit .pcm
files with -fmodule-format=obj (-gmodules) were the ones from the
original invocation, rather than the ones specifically crafted for
outputting the pcm. This was causing the pcm to be written with only the
debug info and without the __clangast section in some cases (e.g. -O2).
This unforunately was not covered by existing tests, because compiling
and loading a module within a single compilation load the ast content
from the in-memory module cache rather than reading it from the pcm file
that was written. This broke bootstrapping a build of clang with modules
enabled on Darwin.

rdar://143418834



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list