[PATCH] [lld] createInternalFiles return value is unused.
Joey Gouly
joey.gouly at gmail.com
Sat Dec 28 12:15:22 PST 2013
The return value of createInternalFiles is never used.. can I nuke it?
http://llvm-reviews.chandlerc.com/D2488
Files:
include/lld/Core/LinkingContext.h
lib/Core/LinkingContext.cpp
lib/ReaderWriter/ELF/Hexagon/HexagonLinkingContext.cpp
lib/ReaderWriter/ELF/Hexagon/HexagonLinkingContext.h
lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp
lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.h
Index: include/lld/Core/LinkingContext.h
===================================================================
--- include/lld/Core/LinkingContext.h
+++ include/lld/Core/LinkingContext.h
@@ -236,7 +236,7 @@
/// during link. Flavors can override this function in their LinkingContext
/// to add more internal files. These internal files are positioned before
/// the actual input files.
- virtual bool createInternalFiles(std::vector<std::unique_ptr<File> > &) const;
+ virtual void createInternalFiles(std::vector<std::unique_ptr<File> > &) const;
/// Return the list of undefined symbols that are specified in the
/// linker command line, using the -u option.
Index: lib/Core/LinkingContext.cpp
===================================================================
--- lib/Core/LinkingContext.cpp
+++ lib/Core/LinkingContext.cpp
@@ -71,16 +71,15 @@
return std::move(undefinedSymFile);
}
-bool LinkingContext::createInternalFiles(
+void LinkingContext::createInternalFiles(
std::vector<std::unique_ptr<File> > &result) const {
std::unique_ptr<File> internalFile;
internalFile = createEntrySymbolFile();
if (internalFile)
result.push_back(std::move(internalFile));
internalFile = createUndefinedSymbolFile();
if (internalFile)
result.push_back(std::move(internalFile));
- return true;
}
void LinkingContext::setResolverState(uint32_t state) {
Index: lib/ReaderWriter/ELF/Hexagon/HexagonLinkingContext.cpp
===================================================================
--- lib/ReaderWriter/ELF/Hexagon/HexagonLinkingContext.cpp
+++ lib/ReaderWriter/ELF/Hexagon/HexagonLinkingContext.cpp
@@ -90,7 +90,7 @@
};
}
-bool elf::HexagonLinkingContext::createInternalFiles(
+void elf::HexagonLinkingContext::createInternalFiles(
std::vector<std::unique_ptr<File> > &result) const {
ELFLinkingContext::createInternalFiles(result);
std::unique_ptr<HexagonInitFiniFile> initFiniFile(
@@ -100,5 +100,4 @@
for (auto ai:finiFunctions())
initFiniFile->addFiniFunction(ai);
result.push_back(std::move(initFiniFile));
- return true;
}
Index: lib/ReaderWriter/ELF/Hexagon/HexagonLinkingContext.h
===================================================================
--- lib/ReaderWriter/ELF/Hexagon/HexagonLinkingContext.h
+++ lib/ReaderWriter/ELF/Hexagon/HexagonLinkingContext.h
@@ -66,7 +66,7 @@
}
/// \brief Create Internal files for Init/Fini
- bool createInternalFiles(std::vector<std::unique_ptr<File> > &result) const;
+ void createInternalFiles(std::vector<std::unique_ptr<File> > &result) const;
};
} // elf
Index: lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp
===================================================================
--- lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp
+++ lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp
@@ -101,7 +101,7 @@
ELFLinkingContext::addPasses(pm);
}
-bool elf::X86_64LinkingContext::createInternalFiles(
+void elf::X86_64LinkingContext::createInternalFiles(
std::vector<std::unique_ptr<File> > &result) const {
ELFLinkingContext::createInternalFiles(result);
std::unique_ptr<X86_64InitFiniFile> initFiniFile(
@@ -111,6 +111,5 @@
for (auto ai:finiFunctions())
initFiniFile->addFiniFunction(ai);
result.push_back(std::move(initFiniFile));
- return true;
}
Index: lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.h
===================================================================
--- lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.h
+++ lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.h
@@ -86,7 +86,7 @@
}
/// \brief Create Internal files for Init/Fini
- bool createInternalFiles(std::vector<std::unique_ptr<File> > &) const;
+ void createInternalFiles(std::vector<std::unique_ptr<File> > &) const;
};
} // end namespace elf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2488.1.patch
Type: text/x-patch
Size: 3820 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131228/ba85b15e/attachment.bin>
More information about the llvm-commits
mailing list