Add missing std:: prefixes to some calls. C++ doesn't require that <cfoo>
authorNick Lewycky <nicholas@mxc.ca>
Sun, 19 Dec 2010 20:42:43 +0000 (20:42 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Sun, 19 Dec 2010 20:42:43 +0000 (20:42 +0000)
headers provide symbols outside namespace std and the LLVM coding standards
state that we should prefix all of them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122192 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/LLLexer.cpp
lib/Target/SubtargetFeature.cpp
lib/Target/TargetInstrInfo.cpp
lib/VMCore/LLVMContext.cpp

index 3c74c26f55acb53dfe4cf8044375b2bf1970e43c..99989ac971bd7f3e1cde25974482ff0f4d11df67 100644 (file)
@@ -833,7 +833,7 @@ lltok::Kind LLLexer::LexDigitOrNegative() {
     }
   }
 
-  APFloatVal = APFloat(atof(TokStart));
+  APFloatVal = APFloat(std::atof(TokStart));
   return lltok::APFloat;
 }
 
@@ -867,6 +867,6 @@ lltok::Kind LLLexer::LexPositive() {
     }
   }
 
-  APFloatVal = APFloat(atof(TokStart));
+  APFloatVal = APFloat(std::atof(TokStart));
   return lltok::APFloat;
 }
index b35190a369ea3d662fd3b93868c12e2a6e4a331b..ba53d63a91cd642cbea308b6818beefa845af708 100644 (file)
@@ -162,7 +162,7 @@ static void Help(const SubtargetFeatureKV *CPUTable, size_t CPUTableSize,
   
   errs() << "Use +feature to enable a feature, or -feature to disable it.\n"
        << "For example, llc -mcpu=mycpu -mattr=+feature1,-feature2\n";
-  exit(1);
+  std::exit(1);
 }
 
 //===----------------------------------------------------------------------===//
index eca97ab09669397d44407e9d5de68686f1b28794..d4986d89ddc38490413919db73702edf4fac04d0 100644 (file)
@@ -164,7 +164,7 @@ unsigned TargetInstrInfo::getInlineAsmLength(const char *Str,
   for (; *Str; ++Str) {
     if (*Str == '\n' || *Str == MAI.getSeparatorChar())
       atInsnStart = true;
-    if (atInsnStart && !isspace(*Str)) {
+    if (atInsnStart && !std::isspace(*Str)) {
       Length += MAI.getMaxInstLength();
       atInsnStart = false;
     }
index 0f51cf224d006811bc2e66823ebcc4880e232bb4..c948320c20ec2e4f5dfc7a1f5863f73ed792a54f 100644 (file)
@@ -110,12 +110,12 @@ static bool isValidName(StringRef MDName) {
   if (MDName.empty())
     return false;
 
-  if (!isalpha(MDName[0]))
+  if (!std::isalpha(MDName[0]))
     return false;
 
   for (StringRef::iterator I = MDName.begin() + 1, E = MDName.end(); I != E;
        ++I) {
-    if (!isalnum(*I) && *I != '_' && *I != '-' && *I != '.')
+    if (!std::isalnum(*I) && *I != '_' && *I != '-' && *I != '.')
       return false;
   }
   return true;