mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 00:23:14 +01:00
[svn r269] Fixed dwarf debug info for structs.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#include "gen/llvm.h"
|
||||
#include "ir/irmodule.h"
|
||||
|
||||
IrModule::IrModule(Module* module)
|
||||
|
||||
@@ -12,7 +12,7 @@ struct IrModule : IrBase
|
||||
|
||||
Module* M;
|
||||
|
||||
llvm::GlobalVariable* dwarfCompileUnit;
|
||||
LLGlobalVariable* dwarfCompileUnit;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -50,6 +50,8 @@ IrStruct::IrStruct(Type* t)
|
||||
|
||||
classDeclared = false;
|
||||
classDefined = false;
|
||||
|
||||
dwarfComposite = NULL;
|
||||
}
|
||||
|
||||
IrStruct::~IrStruct()
|
||||
|
||||
@@ -12,24 +12,24 @@ struct IrInterface : IrBase
|
||||
ClassDeclaration* decl;
|
||||
|
||||
#if OPAQUE_VTBLS
|
||||
const llvm::ArrayType* vtblTy;
|
||||
llvm::ConstantArray* vtblInit;
|
||||
const LLArrayType* vtblTy;
|
||||
LLConstantArray* vtblInit;
|
||||
#else
|
||||
const llvm::StructType* vtblTy;
|
||||
llvm::ConstantStruct* vtblInit;
|
||||
const LLStructType* vtblTy;
|
||||
LLConstantStruct* vtblInit;
|
||||
#endif
|
||||
llvm::GlobalVariable* vtbl;
|
||||
LLGlobalVariable* vtbl;
|
||||
|
||||
const llvm::StructType* infoTy;
|
||||
llvm::ConstantStruct* infoInit;
|
||||
llvm::Constant* info;
|
||||
const LLStructType* infoTy;
|
||||
LLConstantStruct* infoInit;
|
||||
LLConstant* info;
|
||||
|
||||
int index;
|
||||
|
||||
#if OPAQUE_VTBLS
|
||||
IrInterface(BaseClass* b, const llvm::ArrayType* vt);
|
||||
IrInterface(BaseClass* b, const LLArrayType* vt);
|
||||
#else
|
||||
IrInterface(BaseClass* b, const llvm::StructType* vt);
|
||||
IrInterface(BaseClass* b, const LLStructType* vt);
|
||||
#endif
|
||||
~IrInterface();
|
||||
};
|
||||
@@ -45,7 +45,7 @@ struct IrStruct : IrBase
|
||||
{
|
||||
VarDeclaration* var;
|
||||
const LLType* type;
|
||||
llvm::Constant* init;
|
||||
LLConstant* init;
|
||||
|
||||
Offset(VarDeclaration* v, const LLType* ty)
|
||||
: var(v), type(ty), init(NULL) {}
|
||||
@@ -70,25 +70,27 @@ public:
|
||||
InterfaceMap interfaceMap;
|
||||
InterfaceVector interfaceVec;
|
||||
const llvm::ArrayType* interfaceInfosTy;
|
||||
llvm::GlobalVariable* interfaceInfos;
|
||||
LLGlobalVariable* interfaceInfos;
|
||||
|
||||
bool defined;
|
||||
bool constinited;
|
||||
|
||||
llvm::GlobalVariable* vtbl;
|
||||
LLGlobalVariable* vtbl;
|
||||
#if OPAQUE_VTBLS
|
||||
llvm::Constant* constVtbl;
|
||||
LLConstant* constVtbl;
|
||||
#else
|
||||
llvm::ConstantStruct* constVtbl;
|
||||
LLConstantStruct* constVtbl;
|
||||
#endif
|
||||
llvm::GlobalVariable* init;
|
||||
llvm::Constant* constInit;
|
||||
llvm::GlobalVariable* classInfo;
|
||||
llvm::Constant* constClassInfo;
|
||||
LLGlobalVariable* init;
|
||||
LLConstant* constInit;
|
||||
LLGlobalVariable* classInfo;
|
||||
LLConstant* constClassInfo;
|
||||
bool hasUnions;
|
||||
DUnion* dunion;
|
||||
bool classDeclared;
|
||||
bool classDefined;
|
||||
|
||||
LLGlobalVariable* dwarfComposite;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user