[lld] r203399 - [Mips] Remove redundant call to the unique_ptr::get() method followed
Simon Atanasyan
simon at atanasyan.com
Sun Mar 9 06:04:51 PDT 2014
Author: atanasyan
Date: Sun Mar 9 08:04:50 2014
New Revision: 203399
URL: http://llvm.org/viewvc/llvm-project?rev=203399&view=rev
Log:
[Mips] Remove redundant call to the unique_ptr::get() method followed
by the returned pointer dereferencing.
Modified:
lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.cpp
lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h
Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.cpp?rev=203399&r1=203398&r2=203399&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.cpp Sun Mar 9 08:04:50 2014
@@ -23,18 +23,18 @@ MipsTargetHandler::MipsTargetHandler(Mip
_mipsRuntimeFile(new MipsRuntimeFile<Mips32ElELFType>(context)),
_mipsTargetLayout(new MipsTargetLayout<Mips32ElELFType>(context)),
_mipsRelocationHandler(
- new MipsTargetRelocationHandler(*_mipsTargetLayout.get())) {}
+ new MipsTargetRelocationHandler(*_mipsTargetLayout)) {}
std::unique_ptr<Writer> MipsTargetHandler::getWriter() {
switch (_mipsLinkingContext.getOutputELFType()) {
case llvm::ELF::ET_EXEC:
return std::unique_ptr<Writer>(
new elf::MipsExecutableWriter<Mips32ElELFType>(
- _mipsLinkingContext, *_mipsTargetLayout.get()));
+ _mipsLinkingContext, *_mipsTargetLayout));
case llvm::ELF::ET_DYN:
return std::unique_ptr<Writer>(
new elf::MipsDynamicLibraryWriter<Mips32ElELFType>(
- _mipsLinkingContext, *_mipsTargetLayout.get()));
+ _mipsLinkingContext, *_mipsTargetLayout));
case llvm::ELF::ET_REL:
llvm_unreachable("TODO: support -r mode");
default:
Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h?rev=203399&r1=203398&r2=203399&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h Sun Mar 9 08:04:50 2014
@@ -73,11 +73,11 @@ public:
MipsTargetHandler(MipsLinkingContext &context);
MipsTargetLayout<Mips32ElELFType> &getTargetLayout() override {
- return *(_mipsTargetLayout.get());
+ return *_mipsTargetLayout;
}
const MipsTargetRelocationHandler &getRelocationHandler() const override {
- return *(_mipsRelocationHandler.get());
+ return *_mipsRelocationHandler;
}
std::unique_ptr<Writer> getWriter() override;
More information about the llvm-commits
mailing list