mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47374 91177308-0d34-0410-b5e6-96231b3b80d8
63 lines
2.0 KiB
C++
63 lines
2.0 KiB
C++
//===- Configuration.h - Configuration Data Mgmt ----------------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file declares the LLVMC_ConfigDataProvider class which implements the
|
|
// generation of ConfigData objects for the CompilerDriver.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_TOOLS_LLVMC_CONFIGDATA_H
|
|
#define LLVM_TOOLS_LLVMC_CONFIGDATA_H
|
|
|
|
#include "llvm/ADT/StringMap.h"
|
|
#include "CompilerDriver.h"
|
|
|
|
namespace llvm {
|
|
/// This class provides the high level interface to the LLVM Compiler Driver.
|
|
/// The driver's purpose is to make it easier for compiler writers and users
|
|
/// of LLVM to utilize the compiler toolkits and LLVM toolset by learning only
|
|
/// the interface of one program (llvmc).
|
|
///
|
|
/// @see llvmc.cpp
|
|
/// @brief The interface to the LLVM Compiler Driver.
|
|
class LLVMC_ConfigDataProvider : public CompilerDriver::ConfigDataProvider {
|
|
/// @name Constructor
|
|
/// @{
|
|
public:
|
|
virtual ~LLVMC_ConfigDataProvider();
|
|
|
|
/// @name Methods
|
|
/// @{
|
|
public:
|
|
/// @brief Provide the configuration data to the CompilerDriver.
|
|
virtual CompilerDriver::ConfigData*
|
|
ProvideConfigData(const std::string& filetype);
|
|
|
|
/// @brief Allow the configuration directory to be set
|
|
virtual void setConfigDir(const sys::Path& dirName) {
|
|
configDir = dirName;
|
|
}
|
|
|
|
private:
|
|
CompilerDriver::ConfigData* ReadConfigData(const std::string& ftype);
|
|
|
|
/// @}
|
|
/// @name Data
|
|
/// @{
|
|
private:
|
|
/// @brief This type is used internally to hold the configuration data.
|
|
typedef StringMap<CompilerDriver::ConfigData*> ConfigDataMap;
|
|
ConfigDataMap Configurations; ///< The cache of configurations
|
|
sys::Path configDir;
|
|
/// @}
|
|
};
|
|
}
|
|
|
|
#endif
|