[all-commits] [llvm/llvm-project] 524ed4: [Serialization] Place command line defines in the ...

john-brawn-arm via All-commits all-commits at lists.llvm.org
Mon Apr 24 06:08:41 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 524ed4b1ba518d5dd5d67fb9593e0864b0e664a4
      https://github.com/llvm/llvm-project/commit/524ed4b1ba518d5dd5d67fb9593e0864b0e664a4
  Author: John Brawn <john.brawn at arm.com>
  Date:   2023-04-24 (Mon, 24 Apr 2023)

  Changed paths:
    M clang-tools-extra/clangd/index/SymbolCollector.cpp
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Serialization/ASTReader.cpp
    M clang/lib/Serialization/ASTWriter.cpp
    A clang/test/PCH/macro-cmdline.c
    M clang/test/PCH/ms-pch-macro.c

  Log Message:
  -----------
  [Serialization] Place command line defines in the correct file

Fix several problems related to serialization causing command line
defines to be reported as being built-in defines:
 * When serializing the <built-in> and <command line> files don't
   convert them into absolute paths.
 * When deserializing SM_SLOC_BUFFER_ENTRY we need to call
   setHasLineDirectives in the same way as we do for
   SM_SLOC_FILE_ENTRY.
 * When created suggested predefines based on the current command line
   options we need to add line markers in the same way that
   InitializePreprocessor does.
 * Adjust a place in clangd where it was implicitly relying on command
   line defines being treated as builtin.

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




More information about the All-commits mailing list