[lld] r234293 - [ELF] Remove redundant const_cast
Simon Atanasyan
simon at atanasyan.com
Mon Apr 6 21:38:31 PDT 2015
Author: atanasyan
Date: Mon Apr 6 23:38:30 2015
New Revision: 234293
URL: http://llvm.org/viewvc/llvm-project?rev=234293&view=rev
Log:
[ELF] Remove redundant const_cast
No functional changes.
Modified:
lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.h
Modified: lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.h?rev=234293&r1=234292&r2=234293&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.h Mon Apr 6 23:38:30 2015
@@ -370,9 +370,8 @@ void OutputELFWriter<ELFT>::createImplic
auto callback = [this](StringRef sym, RuntimeFile<ELFT> &file) {
processUndefinedSymbol(sym, file);
};
- auto &ctx = const_cast<ELFLinkingContext &>(_ctx);
- ctx.setUndefinesResolver(
- llvm::make_unique<DynamicSymbolFile<ELFT>>(ctx, std::move(callback)));
+ _ctx.setUndefinesResolver(
+ llvm::make_unique<DynamicSymbolFile<ELFT>>(_ctx, std::move(callback)));
// Add script defined symbols
result.push_back(std::move(_scriptFile));
}
More information about the llvm-commits
mailing list