[all-commits] [llvm/llvm-project] 0f1137: [clang/Basic] Make TargetInfo.h not use DataLayout...

Nico Weber via All-commits all-commits at lists.llvm.org
Tue Apr 27 19:30:45 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0f1137ba79c0b3f1ca638e01082443ba5ccde03c
      https://github.com/llvm/llvm-project/commit/0f1137ba79c0b3f1ca638e01082443ba5ccde03c
  Author: Nico Weber <thakis at chromium.org>
  Date:   2021-04-27 (Tue, 27 Apr 2021)

  Changed paths:
    M clang/include/clang/Basic/TargetInfo.h
    M clang/include/clang/CodeGen/BackendUtil.h
    M clang/lib/AST/Mangle.cpp
    M clang/lib/Basic/CMakeLists.txt
    M clang/lib/Basic/TargetInfo.cpp
    M clang/lib/Basic/Targets/AArch64.cpp
    M clang/lib/Basic/Targets/AMDGPU.cpp
    M clang/lib/Basic/Targets/ARM.cpp
    M clang/lib/Basic/Targets/PPC.h
    M clang/lib/Basic/Targets/X86.h
    M clang/lib/CodeGen/BackendUtil.cpp
    M clang/lib/CodeGen/CodeGenAction.cpp
    M clang/lib/CodeGen/ModuleBuilder.cpp
    M clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
    M clang/lib/Frontend/InitPreprocessor.cpp
    M clang/unittests/AST/DeclTest.cpp
    M llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn
    M llvm/utils/gn/secondary/clang/tools/clang-format/BUILD.gn

  Log Message:
  -----------
  [clang/Basic] Make TargetInfo.h not use DataLayout again

Reverts parts of https://reviews.llvm.org/D17183, but keeps the
resetDataLayout() API and adds an assert that checks that datalayout string and
user label prefix are in sync.

Approach 1 in https://reviews.llvm.org/D17183#2653279
Reduces number of TUs build for 'clang-format' from 689 to 575.

I also implemented approach 2 in D100764. If someone feels motivated
to make us use DataLayout more, it's easy to revert this change here
and go with D100764 instead. I don't plan on doing more work in this
area though, so I prefer going with the smaller, more self-consistent change.

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




More information about the All-commits mailing list