summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/CoreLinkingContext.cpp
diff options
context:
space:
mode:
authorShankar Easwaran <shankare@codeaurora.org>2013-10-08 15:43:48 +0000
committerShankar Easwaran <shankare@codeaurora.org>2013-10-08 15:43:48 +0000
commit7f1146c4945a3bad3dafebd39cb62b97d6fbdd53 (patch)
treeb1ca735c96b1d972510c9076d42ac5fa638e09ee /lld/lib/ReaderWriter/CoreLinkingContext.cpp
parent3f359430b3823a5c8cf8912bd356c9e7e8f5a829 (diff)
downloadbcm5719-llvm-7f1146c4945a3bad3dafebd39cb62b97d6fbdd53.tar.gz
bcm5719-llvm-7f1146c4945a3bad3dafebd39cb62b97d6fbdd53.zip
[LinkingContext] make LinkingContext non-const
llvm-svn: 192183
Diffstat (limited to 'lld/lib/ReaderWriter/CoreLinkingContext.cpp')
-rw-r--r--lld/lib/ReaderWriter/CoreLinkingContext.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lld/lib/ReaderWriter/CoreLinkingContext.cpp b/lld/lib/ReaderWriter/CoreLinkingContext.cpp
index bc9a009673d..db17d57d43e 100644
--- a/lld/lib/ReaderWriter/CoreLinkingContext.cpp
+++ b/lld/lib/ReaderWriter/CoreLinkingContext.cpp
@@ -271,8 +271,9 @@ private:
CoreLinkingContext::CoreLinkingContext() {}
-bool CoreLinkingContext::validateImpl(raw_ostream &diagnostics) {
+bool CoreLinkingContext::validateImpl(raw_ostream &) {
_reader = createReaderYAML(*this);
+ _writer = createWriterYAML(*this);
return true;
}
@@ -289,11 +290,7 @@ void CoreLinkingContext::addPasses(PassManager &pm) const {
}
}
-Writer &CoreLinkingContext::writer() const {
- if (!_writer)
- _writer = createWriterYAML(*this);
- return *_writer;
-}
+Writer &CoreLinkingContext::writer() const { return *_writer; }
ErrorOr<Reference::Kind>
CoreLinkingContext::relocKindFromString(StringRef str) const {
OpenPOWER on IntegriCloud