[all-commits] [llvm/llvm-project] 4b3db6: [clang] Add getClangVendor() and use it in CodeGen...

Dimitry Andric via All-commits all-commits at lists.llvm.org
Wed Dec 20 04:46:50 PST 2023


  Branch: refs/heads/users/DimitryAndric/codegen-clang-vendor
  Home:   https://github.com/llvm/llvm-project
  Commit: 4b3db6bdaf9f94277f23bf9a796f474a353e4d73
      https://github.com/llvm/llvm-project/commit/4b3db6bdaf9f94277f23bf9a796f474a353e4d73
  Author: Dimitry Andric <dimitry at andric.com>
  Date:   2023-12-20 (Wed, 20 Dec 2023)

  Changed paths:
    M clang/include/clang/Basic/Version.h
    M clang/lib/Basic/Version.cpp
    M clang/lib/CodeGen/CodeGenModule.cpp

  Log Message:
  -----------
  [clang] Add getClangVendor() and use it in CodeGenModule.cpp

In 9a38a72f1d482 `ProductId` was assigned from the stringified value of
`CLANG_VENDOR`, if that macro was defined. However, `CLANG_VENDOR` is
supposed to be a string, as it is defined (optionally) as such in the
top-level clang `CMakeLists.txt`.

Furthermore, `CLANG_VENDOR` is only passed as a build-time define when
compiling `Version.cpp`, so add a `getClangVendor()` function to
`Version.h`, and use it in `CodegGenModule.cpp`, instead of relying on
the macro.

Fixes: 9a38a72f1d482




More information about the All-commits mailing list