[llvm] r297909 - Fix build failure from r297897.

Rong Xu via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 15 16:00:19 PDT 2017


Author: xur
Date: Wed Mar 15 18:00:19 2017
New Revision: 297909

URL: http://llvm.org/viewvc/llvm-project?rev=297909&view=rev
Log:
Fix build failure from r297897.


Modified:
    llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp?rev=297909&r1=297908&r2=297909&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp Wed Mar 15 18:00:19 2017
@@ -709,11 +709,11 @@ void InstrProfiling::getMemOPSizeOptions
     auto Pos = MemOPSizeRange.find(":");
     if (Pos != std::string::npos) {
       if (Pos > 0)
-        MemOPSizeRangeStart = std::stoi(MemOPSizeRange.substr(0, Pos));
+        MemOPSizeRangeStart = atoi(MemOPSizeRange.substr(0, Pos).c_str());
       if (Pos < MemOPSizeRange.size() - 1)
-        MemOPSizeRangeLast = std::stoi(MemOPSizeRange.substr(Pos + 1));
+        MemOPSizeRangeLast = atoi(MemOPSizeRange.substr(Pos + 1).c_str());
     } else
-      MemOPSizeRangeLast = std::stoi(MemOPSizeRange);
+      MemOPSizeRangeLast = atoi(MemOPSizeRange.c_str());
   }
   assert(MemOPSizeRangeLast >= MemOPSizeRangeStart);
 




More information about the llvm-commits mailing list