brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · e26d2bc Raw
30 lines · c
1//===-- Utility.h -----------------------------------------------*- C++ -*-===//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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_UTILITY_UTILITY_H10#define LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_UTILITY_UTILITY_H11 12#include <tuple>13 14#include "lldb/lldb-forward.h"15#include "lldb/lldb-private-enumerations.h"16 17namespace lldb_private {18 19/// On Darwin, if LLDB loaded libclang_rt, it's coming from a locally built20/// compiler-rt, and we should prefer it in favour of the system sanitizers21/// when running InstrumentationRuntime utility expressions that use symbols22/// from the sanitizer libraries. This helper searches the target for such a23/// dylib. Returns nullptr if no such dylib was found.24std::tuple<lldb::ModuleSP, HistoryPCType>25GetPreferredAsanModule(const Target &target);26 27} // namespace lldb_private28 29#endif // LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_UTILITY_UTILITY_H30