aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Driver
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2012-01-26 21:56:28 +0000
committerJoerg Sonnenberger <joerg@bec.de>2012-01-26 21:56:28 +0000
commit34144f67610be0ac6cb0d85d77bd57662b9232b9 (patch)
treecea9ba845eb9295754751fb627aad8e6a6f3bc43 /include/clang/Driver
parent8bef8238181a30e52dea380789a7e2d760eac532 (diff)
Keep track of the original target the user specified before
normalization. This used to be captured in DefaultTargetTriple and is used for the (optional) $triple-$tool lookup for cross-compilation. Do this properly by making it an attribute of the toolchain and use it in combination with the computed triple as index for the toolchain lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149083 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Driver')
-rw-r--r--include/clang/Driver/ToolChain.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/Driver/ToolChain.h b/include/clang/Driver/ToolChain.h
index 4f3a3be681..7f033563c9 100644
--- a/include/clang/Driver/ToolChain.h
+++ b/include/clang/Driver/ToolChain.h
@@ -46,6 +46,9 @@ public:
private:
const Driver &D;
const llvm::Triple Triple;
+ /// The target triple originally requested by the user
+ /// before modifications due to -m32 and without normalization.
+ const std::string UserTriple;
/// The list of toolchain specific path prefixes to search for
/// files.
@@ -56,7 +59,7 @@ private:
path_list ProgramPaths;
protected:
- ToolChain(const Driver &D, const llvm::Triple &T);
+ ToolChain(const Driver &D, const llvm::Triple &T, const std::string &UT);
/// \name Utilities for implementing subclasses.
///@{
@@ -87,6 +90,9 @@ public:
std::string getTripleString() const {
return Triple.getTriple();
}
+ const std::string &getUserTriple() const {
+ return UserTriple;
+ }
path_list &getFilePaths() { return FilePaths; }
const path_list &getFilePaths() const { return FilePaths; }