/
githubmirror
/
carbon-lang
Обзор
Документация
Войти
/
githubmirror
/
carbon-lang
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
toolchain/driver/testdata/compile/init_array.carbon
24 строки
928 B
Richard Smith
Propagate some target options from Clang to Carbon's target. (#6759)
18 фев 2026, 06:14
Не верифицирован
18 фев 2026, 06:14
768582d
Код
Авторство
О чём код?
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // ARGS: compile foo.carbon --asm-output --output=- --target=x86_64-linux-gnu // // NOAUTOUPDATE // SET-CHECK-SUBSET // TIP: To test this file alone, run: // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/compile/target_machine.carbon // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/compile/target_machine.carbon // --- foo.carbon import Cpp inline ''' int f(); inline int n = f(); '''; // We should use init_array, overriding LLVM's default of using ctors, as Clang // does. // CHECK:STDOUT: {{\s*}}.section{{\s+}}.init_array,{{.*}} // CHECK:STDOUT: {{\s*}}.quad{{\s+}}__cxx_global_var_init