[all-commits] [llvm/llvm-project] 7c97c5: [Modules] Recreate file manager for ftime-trace wh...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Mon Feb 6 01:17:33 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7c97c574cc795705737cd0b73daf6867406fe624
      https://github.com/llvm/llvm-project/commit/7c97c574cc795705737cd0b73daf6867406fe624
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2023-02-06 (Mon, 06 Feb 2023)

  Changed paths:
    M clang/lib/Frontend/CompilerInstance.cpp
    M clang/lib/Frontend/FrontendAction.cpp
    A clang/test/Modules/ftime-trace.cppm
    M clang/tools/driver/cc1_main.cpp

  Log Message:
  -----------
  [Modules] Recreate file manager for ftime-trace when compiling a module

Close https://github.com/llvm/llvm-project/issues/60544.

The root cause for the issue is that when we compile a module unit, the
file manager (and proprocessor and source manager) are owned by AST
instead of the compilaton instance. So the file manager may be invalid
when we want to create a time-report file for -ftime-trace when we are
compiling a module unit.

This patch tries to recreate the file manager for -ftime-trace if we
find the file manager is not valid.




More information about the All-commits mailing list