unsigned Flags = Flags::None);
private:
- void init(Module *M, DiagnosticHandlerFunction DiagnosticHandler);
Module *Composite;
IdentifiedStructTypeSet IdentifiedStructTypes;
return *I == Ty;
}
-void Linker::init(Module *M, DiagnosticHandlerFunction DiagnosticHandler) {
+Linker::Linker(Module *M, DiagnosticHandlerFunction DiagnosticHandler) {
this->Composite = M;
this->DiagnosticHandler = 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;