OSDN Git Service

Subzero: Fix lit and cross tests broken in f8b4cc8.
authorJim Stichnoth <stichnot@chromium.org>
Thu, 11 Jun 2015 17:19:32 +0000 (10:19 -0700)
committerJim Stichnoth <stichnot@chromium.org>
Thu, 11 Jun 2015 17:19:32 +0000 (10:19 -0700)
commitd9f1f9fcb8f0ffe72e52722e26b735386db5fb3b
tree285b5fc275834a4f741e38589ec63424d5a1d4c4
parent1a9043e71827183679814c99f375ef5a2a6f15ad
Subzero: Fix lit and cross tests broken in f8b4cc8.

1. The data symbol __Sz_block_profile_info should never be mangled (for cross tests), similar to runtime helper calls.  Add a SuppressMangling override for such variable declarations.

2. When cross tests contain more than one translated object file, we end up with multiple definitions of __Sz_block_profile_info .  Work around this by making that symbol weak.

3. Don't try to attach global inits to an EmitterWorkItem that represents a translation error.

4. Update one lit test to reflect the additional profiling value in the data section.

5. Update one lit test to reflect that global initializers are emitted at the end instead of the beginning.

The check-unit test is still broken and will be fixed in a separate CL.

BUG= none
R=kschimpf@google.com

Review URL: https://codereview.chromium.org/1180883002
pydir/crosstest.py
src/IceGlobalContext.cpp
src/IceGlobalInits.h
tests_lit/llvm2ice_tests/elf_container.ll
tests_lit/llvm2ice_tests/globalinit.pnacl.ll