[all-commits] [llvm/llvm-project] e3b525: [MC] Avoid calling vector<FieldInfo> members befor...

Ilya Biryukov via All-commits all-commits at lists.llvm.org
Wed Aug 10 10:22:55 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e3b5254d7160abde7e6302548edca2cad8a6b63f
      https://github.com/llvm/llvm-project/commit/e3b5254d7160abde7e6302548edca2cad8a6b63f
  Author: Ilya Biryukov <ibiryukov at google.com>
  Date:   2022-08-10 (Wed, 10 Aug 2022)

  Changed paths:
    M llvm/lib/MC/MCParser/MasmParser.cpp

  Log Message:
  -----------
  [MC] Avoid calling vector<FieldInfo> members before FieldInfo is defined

The C++ Standard requires a complete type T when using any members of
`vector<T>`, see
https://eel.is/c++draft/vector#overview-4.

This only breaks with latest libc++ in C++20 mode and does not show up
in common configurations.
We have an internal experimental configuration that discovered this.

Reviewed By: alexfh

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




More information about the All-commits mailing list