xref: /aosp_15_r20/external/angle/build/rust/std/alias.cc (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker // Copyright 2023 The Chromium Authors
2*8975f5c5SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be
3*8975f5c5SAndroid Build Coastguard Worker // found in the LICENSE file.
4*8975f5c5SAndroid Build Coastguard Worker 
5*8975f5c5SAndroid Build Coastguard Worker // This file has been copied from //base/debug/alias.cc ( additionally the APIs
6*8975f5c5SAndroid Build Coastguard Worker // were moved into the `build_rust_std` namespace).
7*8975f5c5SAndroid Build Coastguard Worker //
8*8975f5c5SAndroid Build Coastguard Worker // TODO(crbug.com/40279749): Avoid code duplication / reuse code.
9*8975f5c5SAndroid Build Coastguard Worker 
10*8975f5c5SAndroid Build Coastguard Worker #include "build/rust/std/alias.h"
11*8975f5c5SAndroid Build Coastguard Worker 
12*8975f5c5SAndroid Build Coastguard Worker #include "build/rust/std/compiler_specific.h"
13*8975f5c5SAndroid Build Coastguard Worker 
14*8975f5c5SAndroid Build Coastguard Worker namespace build_rust_std {
15*8975f5c5SAndroid Build Coastguard Worker namespace debug {
16*8975f5c5SAndroid Build Coastguard Worker 
17*8975f5c5SAndroid Build Coastguard Worker // This file/function should be excluded from LTO/LTCG to ensure that the
18*8975f5c5SAndroid Build Coastguard Worker // compiler can't see this function's implementation when compiling calls to it.
Alias(const void * var)19*8975f5c5SAndroid Build Coastguard Worker NOINLINE void Alias(const void* var) {}
20*8975f5c5SAndroid Build Coastguard Worker 
21*8975f5c5SAndroid Build Coastguard Worker }  // namespace debug
22*8975f5c5SAndroid Build Coastguard Worker }  // namespace build_rust_std
23