1 //===-- msan_chained_origin_depot.cpp -------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file is a part of MemorySanitizer.
11 // A storage for chained origins.
12 //===----------------------------------------------------------------------===//
14 #include "msan_chained_origin_depot.h"
16 #include "sanitizer_common/sanitizer_chained_origin_depot.h"
20 static ChainedOriginDepot chainedOriginDepot
;
22 StackDepotStats
ChainedOriginDepotGetStats() {
23 return chainedOriginDepot
.GetStats();
26 bool ChainedOriginDepotPut(u32 here_id
, u32 prev_id
, u32
*new_id
) {
27 return chainedOriginDepot
.Put(here_id
, prev_id
, new_id
);
30 u32
ChainedOriginDepotGet(u32 id
, u32
*other
) {
31 return chainedOriginDepot
.Get(id
, other
);
34 void ChainedOriginDepotLockAll() {
35 chainedOriginDepot
.LockAll();
38 void ChainedOriginDepotUnlockAll() {
39 chainedOriginDepot
.UnlockAll();