summaryrefslogtreecommitdiffstats
path: root/lld/lib/Core/LinkingContext.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-12-26 06:35:35 +0000
committerRui Ueyama <ruiu@google.com>2013-12-26 06:35:35 +0000
commit61b851ab06eeb63852766f8c757398fa25d54987 (patch)
treefae41554b86e04a96614543420eea2c1146f08e0 /lld/lib/Core/LinkingContext.cpp
parentb561f9eb0d7cd994457fc44f8a6d1e965e429def (diff)
downloadbcm5719-llvm-61b851ab06eeb63852766f8c757398fa25d54987.tar.gz
bcm5719-llvm-61b851ab06eeb63852766f8c757398fa25d54987.zip
Remove duplicate methods.
llvm-svn: 198034
Diffstat (limited to 'lld/lib/Core/LinkingContext.cpp')
-rw-r--r--lld/lib/Core/LinkingContext.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/lld/lib/Core/LinkingContext.cpp b/lld/lib/Core/LinkingContext.cpp
index a9072103d8e..8ac6f591253 100644
--- a/lld/lib/Core/LinkingContext.cpp
+++ b/lld/lib/Core/LinkingContext.cpp
@@ -43,20 +43,28 @@ bool LinkingContext::createImplicitFiles(
}
std::unique_ptr<File> LinkingContext::createEntrySymbolFile() const {
+ return createEntrySymbolFile("command line option -u");
+}
+
+std::unique_ptr<File>
+LinkingContext::createEntrySymbolFile(StringRef filename) const {
if (entrySymbolName().empty())
return nullptr;
- std::unique_ptr<SimpleFile> entryFile(
- new SimpleFile("command line option -entry"));
+ std::unique_ptr<SimpleFile> entryFile(new SimpleFile(filename));
entryFile->addAtom(
*(new (_allocator) SimpleUndefinedAtom(*entryFile, entrySymbolName())));
return std::move(entryFile);
}
std::unique_ptr<File> LinkingContext::createUndefinedSymbolFile() const {
+ return createUndefinedSymbolFile("command line option -u");
+}
+
+std::unique_ptr<File>
+LinkingContext::createUndefinedSymbolFile(StringRef filename) const {
if (_initialUndefinedSymbols.empty())
return nullptr;
- std::unique_ptr<SimpleFile> undefinedSymFile(
- new SimpleFile("command line option -u"));
+ std::unique_ptr<SimpleFile> undefinedSymFile(new SimpleFile(filename));
for (auto undefSymStr : _initialUndefinedSymbols)
undefinedSymFile->addAtom(*(new (_allocator) SimpleUndefinedAtom(
*undefinedSymFile, undefSymStr)));
OpenPOWER on IntegriCloud