Files
clice/include/Server/Command.h
ykiko c082458fb1 1. Make resource dir unique and global.
2. Use our custom CDB loader.
2024-12-10 16:15:50 +08:00

25 lines
542 B
C++

#pragma once
#include "Support/Support.h"
#include "clang/Tooling/CompilationDatabase.h"
namespace clice {
class CommandManager {
public:
void update(llvm::StringRef dir);
/// Return the commands of first meet file.
llvm::StringRef lookupFirst(llvm::StringRef file);
llvm::ArrayRef<std::string> lookup(llvm::StringRef file);
private:
/// CDB file -> file -> [commands]
using Commands = std::vector<std::string>;
using CDB = llvm::StringMap<Commands>;
llvm::StringMap<CDB> CDBs;
};
} // namespace clice