[llvm] 9aa4c6a - [Support] revert accidentally removed "std::" specifiers

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 15:31:49 PST 2023


Author: Sanjay Patel
Date: 2023-01-23T18:31:43-05:00
New Revision: 9aa4c6a1e48398c685b506a17effc2db38fb8636

URL: https://github.com/llvm/llvm-project/commit/9aa4c6a1e48398c685b506a17effc2db38fb8636
DIFF: https://github.com/llvm/llvm-project/commit/9aa4c6a1e48398c685b506a17effc2db38fb8636.diff

LOG: [Support] revert accidentally removed "std::" specifiers

This snuck into e76c95fb40b1 but wasn't intended.
Note: for some reason, these prefixes are causing build failures
on a macOS XCode project of LLVM.

Added: 
    

Modified: 
    llvm/lib/Support/NativeFormatting.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Support/NativeFormatting.cpp b/llvm/lib/Support/NativeFormatting.cpp
index 99e705edcc698..6e8137c405b80 100644
--- a/llvm/lib/Support/NativeFormatting.cpp
+++ b/llvm/lib/Support/NativeFormatting.cpp
@@ -169,11 +169,11 @@ void llvm::write_double(raw_ostream &S, double N, FloatStyle Style,
                         std::optional<size_t> Precision) {
   size_t Prec = Precision.value_or(getDefaultPrecision(Style));
 
-  if (isnan(N)) {
+  if (std::isnan(N)) {
     S << "nan";
     return;
-  } else if (isinf(N)) {
-    S << (signbit(N) ? "-INF" : "INF");
+  } else if (std::isinf(N)) {
+    S << (std::signbit(N) ? "-INF" : "INF");
     return;
   }
 


        


More information about the llvm-commits mailing list