diff --git a/dmd/mtype.h b/dmd/mtype.h index f2b11346..80e605d7 100644 --- a/dmd/mtype.h +++ b/dmd/mtype.h @@ -23,7 +23,7 @@ #if IN_LLVM // llvm -#include "../ir/irtype.h" +#include "../ir/irdtype.h" #include "../ir/irfuncty.h" namespace llvm { class Type; } struct Ir; @@ -279,7 +279,7 @@ struct Type : Object #if IN_LLVM // LDC - IrType ir; + IrDType ir; static Ir* sir; #endif }; diff --git a/gen/toobj.cpp b/gen/toobj.cpp index 4a7ef3a5..6677e61a 100644 --- a/gen/toobj.cpp +++ b/gen/toobj.cpp @@ -96,7 +96,7 @@ llvm::Module* Module::genLLVMModule(Ir* sir) // reset all IR data stored in Dsymbols and Types IrDsymbol::resetAll(); - IrType::resetAll(); + IrDType::resetAll(); sir->setState(&ir); diff --git a/ir/irtype.cpp b/ir/irdtype.cpp similarity index 57% rename from ir/irtype.cpp rename to ir/irdtype.cpp index c1944d89..24293962 100644 --- a/ir/irtype.cpp +++ b/ir/irdtype.cpp @@ -1,34 +1,34 @@ #include "gen/llvm.h" #include "ir/ir.h" -#include "ir/irtype.h" +#include "ir/irdtype.h" -std::set IrType::list; +std::set IrDType::list; -void IrType::resetAll() +void IrDType::resetAll() { - std::set::iterator it; + std::set::iterator it; for(it = list.begin(); it != list.end(); ++it) (*it)->reset(); } -IrType::IrType() +IrDType::IrDType() { assert(list.insert(this).second); reset(); } -IrType::IrType(const IrType& s) +IrDType::IrDType(const IrDType& s) { assert(list.insert(this).second); type = s.type; } -IrType::~IrType() +IrDType::~IrDType() { list.erase(this); } -void IrType::reset() +void IrDType::reset() { type = NULL; } diff --git a/ir/irtype.h b/ir/irdtype.h similarity index 71% rename from ir/irtype.h rename to ir/irdtype.h index f011f5ef..de7c4fc3 100644 --- a/ir/irtype.h +++ b/ir/irdtype.h @@ -7,16 +7,16 @@ namespace llvm { class PATypeHolder; } -struct IrType +struct IrDType { - static std::set list; + static std::set list; static void resetAll(); // overload all of these to make sure // the static list is up to date - IrType(); - IrType(const IrType& s); - ~IrType(); + IrDType(); + IrDType(const IrDType& s); + ~IrDType(); void reset();