cdc514e4c6
LLDB has a few different styles of header guards and they're not very consistent because things get moved around or copy/pasted. This patch unifies the header guards across LLDB and converts everything to match LLVM's style. Differential revision: https://reviews.llvm.org/D74743
37 lines
1.3 KiB
C++
37 lines
1.3 KiB
C++
//===-- MockTildeExpressionResolver.h ---------------------------*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLDB_UNITTESTS_TESTINGSUPPORT_MOCKTILDEEXPRESSIONRESOLVER_H
|
|
#define LLDB_UNITTESTS_TESTINGSUPPORT_MOCKTILDEEXPRESSIONRESOLVER_H
|
|
|
|
#include "lldb/Utility/TildeExpressionResolver.h"
|
|
|
|
#include "llvm/ADT/SmallString.h"
|
|
#include "llvm/ADT/StringMap.h"
|
|
|
|
namespace lldb_private {
|
|
class MockTildeExpressionResolver : public TildeExpressionResolver {
|
|
llvm::StringRef CurrentUser;
|
|
llvm::StringMap<llvm::StringRef> UserDirectories;
|
|
|
|
public:
|
|
MockTildeExpressionResolver(llvm::StringRef CurrentUser,
|
|
llvm::StringRef HomeDir);
|
|
|
|
void AddKnownUser(llvm::StringRef User, llvm::StringRef HomeDir);
|
|
void Clear();
|
|
void SetCurrentUser(llvm::StringRef User);
|
|
|
|
bool ResolveExact(llvm::StringRef Expr,
|
|
llvm::SmallVectorImpl<char> &Output) override;
|
|
bool ResolvePartial(llvm::StringRef Expr, llvm::StringSet<> &Output) override;
|
|
};
|
|
} // namespace lldb_private
|
|
|
|
#endif
|