[PATCH] D43247: Use reinterpret_cast<> instead of C-style cast. NFC.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 13 10:14:04 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rLLD325033: Use reinterpret_cast<> instead of C-style cast. NFC. (authored by ruiu, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D43247?vs=134067&id=134075#toc
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D43247
Files:
COFF/SymbolTable.cpp
ELF/SymbolTable.cpp
Index: COFF/SymbolTable.cpp
===================================================================
--- COFF/SymbolTable.cpp
+++ COFF/SymbolTable.cpp
@@ -145,7 +145,7 @@
Symbol *&Sym = SymMap[CachedHashStringRef(Name)];
if (Sym)
return {Sym, false};
- Sym = (Symbol *)make<SymbolUnion>();
+ Sym = reinterpret_cast<Symbol *>(make<SymbolUnion>());
Sym->IsUsedInRegularObj = false;
Sym->PendingArchiveLoad = false;
return {Sym, true};
Index: ELF/SymbolTable.cpp
===================================================================
--- ELF/SymbolTable.cpp
+++ ELF/SymbolTable.cpp
@@ -186,7 +186,7 @@
// First, make a copy of __real_sym.
Symbol *Real = nullptr;
if (W.Real->isDefined()) {
- Real = (Symbol *)make<SymbolUnion>();
+ Real = reinterpret_cast<Symbol *>(make<SymbolUnion>());
memcpy(Real, W.Real, sizeof(SymbolUnion));
}
@@ -234,7 +234,7 @@
Symbol *Sym;
if (IsNew) {
- Sym = (Symbol *)make<SymbolUnion>();
+ Sym = reinterpret_cast<Symbol *>(make<SymbolUnion>());
Sym->InVersionScript = false;
Sym->Visibility = STV_DEFAULT;
Sym->IsUsedInRegularObj = false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43247.134075.patch
Type: text/x-patch
Size: 1148 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180213/fc98cff5/attachment.bin>
More information about the llvm-commits
mailing list