[llvm] 838d122 - [TargetLoweringObjectFileImpl] Use llvm::transform

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sun May 24 21:02:31 PDT 2020


Author: Orivej Desh
Date: 2020-05-24T20:59:24-07:00
New Revision: 838d12207b04b7be7245fdff0ce93335bafe5b78

URL: https://github.com/llvm/llvm-project/commit/838d12207b04b7be7245fdff0ce93335bafe5b78
DIFF: https://github.com/llvm/llvm-project/commit/838d12207b04b7be7245fdff0ce93335bafe5b78.diff

LOG: [TargetLoweringObjectFileImpl] Use llvm::transform

Fixes a build issue with libc++ configured with _LIBCPP_RAW_ITERATORS (ADL not effective)

```
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:1602:3: error: no matching function for call to 'transform'
  transform(HexString.begin(), HexString.end(), HexString.begin(), tolower);
  ^~~~~~~~~
```

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D80475

Added: 
    

Modified: 
    llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 5a5cde4b8c52..38a0223688ba 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -1746,7 +1746,7 @@ const MCExpr *TargetLoweringObjectFileCOFF::lowerRelativeReference(
 static std::string APIntToHexString(const APInt &AI) {
   unsigned Width = (AI.getBitWidth() / 8) * 2;
   std::string HexString = AI.toString(16, /*Signed=*/false);
-  transform(HexString.begin(), HexString.end(), HexString.begin(), tolower);
+  llvm::transform(HexString, HexString.begin(), tolower);
   unsigned Size = HexString.size();
   assert(Width >= Size && "hex string is too large!");
   HexString.insert(HexString.begin(), Width - Size, '0');


        


More information about the llvm-commits mailing list