• Tom Tan's avatar
    Avoid defining class name `Label` as type alias in cctest because it is used by V8 · 8d107684
    Tom Tan authored
    It is not recommended to define type alias in C++ header file. cctest defines
    type alias `using Label=CodeAssemblerLabel` in anonymous namespace under
    namespace `v8::internal::compiler` in test-code-assembler.cc. This is fine
    because this type alias is expected to take effect only in this .cc file. But in
    jumbo build, multiple source files are combined as a single one, and the
    previous `Label` type alias could shadow definition of `Label` from other header
    file (for example, v8/src/codegen/label.h which is included by another .cc file)
    This is totally unexpected and triggers bad class layout and accessing in the
    latter .cc file for the places where `Label` is referenced.
    
    This change fixes cctest from Windows ARM64 jumbo build, but it applies to
    other architectures too.
    
    Bug: chromium:893460
    Change-Id: Ib2e9df76f6e3371b3940649668c5d13e6b36f028
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1788537Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Commit-Queue: Tom Tan <Tom.Tan@microsoft.com>
    Cr-Commit-Position: refs/heads/master@{#63605}
    8d107684
Name
Last commit
Last update
..
test-torque.cc Loading commit data...