OSDN Git Service

Fix sdk_x86-sdk build. Add <cctype> for tolower().
authorShih-wei Liao <sliao@google.com>
Wed, 25 Apr 2012 06:43:14 +0000 (23:43 -0700)
committerShih-wei Liao <sliao@google.com>
Wed, 25 Apr 2012 06:43:14 +0000 (23:43 -0700)
Change-Id: If3be5e195a8ee00abef055b7e98577b9981866eb

lib/Target/X86/X86ISelLowering.cpp

index 04299f3..3042386 100644 (file)
@@ -49,6 +49,7 @@
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Target/TargetOptions.h"
 #include <bitset>
+#include <cctype>
 using namespace llvm;
 
 STATISTIC(NumTailCalls, "Number of tail calls");
@@ -15747,8 +15748,8 @@ X86TargetLowering::getRegForInlineAsmConstraint(const std::string &Constraint,
   if (Res.second == 0) {
     // Map st(0) -> st(7) -> ST0
     if (Constraint.size() == 7 && Constraint[0] == '{' &&
-        tolower(Constraint[1]) == 's' &&
-        tolower(Constraint[2]) == 't' &&
+        std::tolower(Constraint[1]) == 's' &&
+        std::tolower(Constraint[2]) == 't' &&
         Constraint[3] == '(' &&
         (Constraint[4] >= '0' && Constraint[4] <= '7') &&
         Constraint[5] == ')' &&