[all-commits] [llvm/llvm-project] ccde60: Fix llvm/lib/ObjCopy, llvm/llvm-ifs: c++20 compati...

angelomatnigoogle via All-commits all-commits at lists.llvm.org
Fri Oct 14 10:29:04 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ccde601f140c79344e67e3a5164524ea3d8f43aa
      https://github.com/llvm/llvm-project/commit/ccde601f140c79344e67e3a5164524ea3d8f43aa
  Author: Angelo Matni <angelomatni at google.com>
  Date:   2022-10-14 (Fri, 14 Oct 2022)

  Changed paths:
    M llvm/lib/ObjCopy/MachO/MachOObject.cpp
    M llvm/lib/ObjCopy/MachO/MachOObject.h
    M llvm/tools/llvm-ifs/ErrorCollector.h

  Log Message:
  -----------
  Fix llvm/lib/ObjCopy, llvm/llvm-ifs: c++20 compatibility

Cleanup: avoid referring to `std::vector<T>` members when `T` is incomplete.

This is [not legal](https://timsong-cpp.github.io/cppwp/n4868/vector#overview-4)
according to the C++ standard, and causes build errors in particular in C++20
mode. Fix it by defining the vector's type before using the vector.

Reviewed By: saugustine, MaskRay

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




More information about the All-commits mailing list