aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-05-09 18:37:26 +0000
committerChad Rosier <mcrosier@apple.com>2012-05-09 18:37:26 +0000
commit4ec2678021a4621228321958b3641540f27a834a (patch)
tree5280bb603817ff988b78eef81ff33fdaf5ef0d12
parent025983a8dd27fd5ff1defa11ebcd88ecd7248773 (diff)
Move the iOSVersionMin string to a header so as to avoid a dangling pointer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156497 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Driver/ToolChains.cpp1
-rw-r--r--lib/Driver/ToolChains.h4
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 86fef4fe69..2e2ec938f5 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -525,7 +525,6 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const {
// go ahead as assume we're targeting iOS.
if (OSXTarget.empty() && iOSTarget.empty())
if (getDarwinArchName(Args) == "armv7") {
- std::string iOSVersionMin;
unsigned Major, Minor, Micro;
getTriple().getiOSVersion(Major, Minor, Micro);
llvm::raw_string_ostream(iOSVersionMin)
diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h
index 8456514b2f..aabf25884c 100644
--- a/lib/Driver/ToolChains.h
+++ b/lib/Driver/ToolChains.h
@@ -205,6 +205,10 @@ private:
/// initialized.
std::string MacosxVersionMin;
+ /// The default ios-version-min of this tool chain; empty until
+ /// initialized.
+ std::string iOSVersionMin;
+
bool hasARCRuntime() const;
bool hasSubscriptingRuntime() const;