summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index c57c70e322a..9aff43f3199 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -2032,7 +2032,7 @@ bool Linker::IdentifiedStructTypeSet::hasType(StructType *Ty) {
return *I == Ty;
}
-void Linker::init(Module *M, DiagnosticHandlerFunction DiagnosticHandler) {
+Linker::Linker(Module *M, DiagnosticHandlerFunction DiagnosticHandler) {
this->Composite = M;
this->DiagnosticHandler = DiagnosticHandler;
@@ -2046,15 +2046,10 @@ void Linker::init(Module *M, DiagnosticHandlerFunction DiagnosticHandler) {
}
}
-Linker::Linker(Module *M, DiagnosticHandlerFunction DiagnosticHandler) {
- init(M, DiagnosticHandler);
-}
-
-Linker::Linker(Module *M) {
- init(M, [this](const DiagnosticInfo &DI) {
- Composite->getContext().diagnose(DI);
- });
-}
+Linker::Linker(Module *M)
+ : Linker(M, [this](const DiagnosticInfo &DI) {
+ Composite->getContext().diagnose(DI);
+ }) {}
void Linker::deleteModule() {
delete Composite;
OpenPOWER on IntegriCloud