view gen/configfile.h @ 1134:152bd2c804d0

Update comments now that LLVM PR3861 has been fixed. However, since conditionally removing the workaround makes the ABI dependent on LLVM version, I reconsidered that. (The same revision of LDC compiling for the same target should probably produce code that follows the same ABI, right?)
author Frits van Bommel <fvbommel wxs.nl>
date Tue, 24 Mar 2009 02:46:57 +0100
parents b30fe7e1dbb9
children 7d3b47852a7a
line wrap: on
line source

#ifndef LDC_CONF_CONFIGFILE_H
#define LDC_CONF_CONFIGFILE_H

#include <vector>

namespace libconfig
{
    class Config;
}

class ConfigFile
{
public:
    typedef std::vector<const char*>    s_vector;
    typedef s_vector::iterator          s_iterator;

public:
    ConfigFile();
    ~ConfigFile();

    bool read(const char* argv0, void* mainAddr, const char* filename);

    s_iterator switches_begin()   { return switches.begin(); }
    s_iterator switches_end()     { return switches.end(); }

private:
    libconfig::Config* cfg;

    s_vector switches;
};

#endif // LDC_CONF_CONFIGFILE_H