mirror of
https://github.com/RPCSX/llvm.git
synced 2025-04-02 08:11:54 +00:00
Use a forwarding constructor instead of an init method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254435 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1d06f0bf4e
commit
f0edaf8e00
@ -93,7 +93,6 @@ public:
|
||||
unsigned Flags = Flags::None);
|
||||
|
||||
private:
|
||||
void init(Module *M, DiagnosticHandlerFunction DiagnosticHandler);
|
||||
Module *Composite;
|
||||
|
||||
IdentifiedStructTypeSet IdentifiedStructTypes;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user