Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / lib / msan / msan_chained_origin_depot.cpp
blob49b14131a89be0ad51a73583155f0edb9e982922
1 //===-- msan_chained_origin_depot.cpp -------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 //
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"
18 namespace __msan {
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();
42 } // namespace __msan