]> granicus.if.org Git - clang/commitdiff
Move the iOSVersionMin string to a header so as to avoid a dangling pointer.
authorChad Rosier <mcrosier@apple.com>
Wed, 9 May 2012 18:37:26 +0000 (18:37 +0000)
committerChad Rosier <mcrosier@apple.com>
Wed, 9 May 2012 18:37:26 +0000 (18:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156497 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains.cpp
lib/Driver/ToolChains.h

index 86fef4fe6937cb479abbdabdb538999fd3ce0f44..2e2ec938f51794b04c5f15a4749d2274d19f4148 100644 (file)
@@ -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)
index 8456514b2f4939414d770f84f12770309bf23935..aabf25884cbc7910fae9df701f91a7ef78dbcc41 100644 (file)
@@ -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;