summaryrefslogtreecommitdiffstats
path: root/clang/include
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang/Driver/Driver.h2
-rw-r--r--clang/include/clang/Driver/HostInfo.h14
2 files changed, 10 insertions, 6 deletions
diff --git a/clang/include/clang/Driver/Driver.h b/clang/include/clang/Driver/Driver.h
index bf953257579..b0e6976ea75 100644
--- a/clang/include/clang/Driver/Driver.h
+++ b/clang/include/clang/Driver/Driver.h
@@ -220,7 +220,7 @@ public:
/// GetHostInfo - Construct a new host info object for the given
/// host triple.
- static const HostInfo *GetHostInfo(const char *HostTriple);
+ const HostInfo *GetHostInfo(const char *HostTriple) const;
/// @}
};
diff --git a/clang/include/clang/Driver/HostInfo.h b/clang/include/clang/Driver/HostInfo.h
index dfa3f75f89c..10ad2f9fe91 100644
--- a/clang/include/clang/Driver/HostInfo.h
+++ b/clang/include/clang/Driver/HostInfo.h
@@ -15,6 +15,7 @@
namespace clang {
namespace driver {
class ArgList;
+ class Driver;
class ToolChain;
/// HostInfo - Config information about a particular host which may
@@ -25,14 +26,17 @@ namespace driver {
/// being run from. For testing purposes, the HostInfo used by the
/// driver may differ from the actual host.
class HostInfo {
+ const Driver &TheDriver;
std::string Arch, Platform, OS;
protected:
- HostInfo(const char *Arch, const char *Platform, const char *OS);
+ HostInfo(const Driver &D, const char *Arch,
+ const char *Platform, const char *OS);
public:
virtual ~HostInfo();
+ const Driver &getDriver() const { return TheDriver; }
const std::string &getArchName() const { return Arch; }
const std::string &getPlatformName() const { return Platform; }
const std::string &getOSName() const { return OS; }
@@ -56,10 +60,10 @@ public:
const char *ArchName=0) const = 0;
};
-const HostInfo *createDarwinHostInfo(const char *Arch, const char *Platform,
- const char *OS);
-const HostInfo *createUnknownHostInfo(const char *Arch, const char *Platform,
- const char *OS);
+const HostInfo *createDarwinHostInfo(const Driver &D, const char *Arch,
+ const char *Platform, const char *OS);
+const HostInfo *createUnknownHostInfo(const Driver &D, const char *Arch,
+ const char *Platform, const char *OS);
} // end namespace driver
} // end namespace clang
OpenPOWER on IntegriCloud