Fix build with LLVM ToT

This commit is contained in:
Matt Pharr
2011-11-04 07:06:15 -07:00
parent ba9bb3338f
commit 5fc8df3e55
2 changed files with 10 additions and 1 deletions

View File

@@ -211,7 +211,11 @@ std::string
Target::GetTripleString() const {
llvm::Triple triple;
// Start with the host triple as the default
#if defined(LLVM_3_1) || defined(LLVM_3_1svn)
triple.setTriple(llvm::sys::getDefaultTargetTriple());
#else
triple.setTriple(llvm::sys::getHostTriple());
#endif
// And override the arch in the host triple based on what the user
// specified. Here we need to deal with the fact that LLVM uses one