diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2010-08-23 22:35:37 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2010-08-23 22:35:37 +0000 |
| commit | 82eb4ce47661d987735cf34ebb5289806f518c53 (patch) | |
| tree | 93189ef418eedae36899e887936cea3a635d5088 /clang/lib/Driver/ToolChains.h | |
| parent | f10f9bec833f6b438d52d3dcb70578bfde449116 (diff) | |
| download | bcm5719-llvm-82eb4ce47661d987735cf34ebb5289806f518c53.tar.gz bcm5719-llvm-82eb4ce47661d987735cf34ebb5289806f518c53.zip | |
Driver: Move Clang "triple" computation routines to method on the
ToolChain. This fixes a potenial bad cast when running Clang on PPC code, since
the tool chain in effect is not a subclass of the Darwin one, but we were
treating it like it was.
- This introduces some gross code duplication, but the right fix for it is to
just move the Driver to start depending on the targets in libBasic, so I am
not planning on fixing it immediately.
llvm-svn: 111856
Diffstat (limited to 'clang/lib/Driver/ToolChains.h')
| -rw-r--r-- | clang/lib/Driver/ToolChains.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains.h b/clang/lib/Driver/ToolChains.h index 742daadab80..d1f15565e6c 100644 --- a/clang/lib/Driver/ToolChains.h +++ b/clang/lib/Driver/ToolChains.h @@ -73,6 +73,8 @@ public: Darwin(const HostInfo &Host, const llvm::Triple& Triple); ~Darwin(); + std::string ComputeEffectiveClangTriple(const ArgList &Args) const; + /// @name Darwin Specific Toolchain API /// { @@ -251,6 +253,8 @@ public: Darwin_Generic_GCC(const HostInfo &Host, const llvm::Triple& Triple) : Generic_GCC(Host, Triple) {} + std::string ComputeEffectiveClangTriple(const ArgList &Args) const; + virtual const char *GetDefaultRelocationModel() const { return "pic"; } }; |

