changeset 835:3afe9f276db7

Added back a bunch of static's to gen/classes.cpp, it's not superfluous, it makes the functions internal to the compilation unit, and we don't call them anywhere else.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Tue, 09 Dec 2008 02:07:24 +0100
parents f466f475b654
children 14c3319ac1bb
files gen/classes.cpp
diffstat 1 files changed, 15 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/gen/classes.cpp	Tue Dec 09 01:56:39 2008 +0100
+++ b/gen/classes.cpp	Tue Dec 09 02:07:24 2008 +0100
@@ -22,7 +22,7 @@
 //////////////////////////////////////////////////////////////////////////////////////////
 
 // adds the base interfaces of b and the given iri to IrStruct's interfaceMap
-void add_base_interfaces(IrStruct* to, IrInterface* iri, BaseClass* b)
+static void add_base_interfaces(IrStruct* to, IrInterface* iri, BaseClass* b)
 {
     for (unsigned j = 0; j < b->baseInterfaces_dim; j++)
     {
@@ -39,7 +39,7 @@
 
 // adds interface b to target, if newinstance != 0, then target must provide all
 // functions required to implement b (it reimplements b)
-void add_interface(ClassDeclaration* target, BaseClass* b, int newinstance)
+static void add_interface(ClassDeclaration* target, BaseClass* b, int newinstance)
 {
     Logger::println("adding interface: %s", b->base->toChars());
     LOG_SCOPE;
@@ -90,7 +90,7 @@
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void add_class_data(ClassDeclaration* target, ClassDeclaration* cd)
+static void add_class_data(ClassDeclaration* target, ClassDeclaration* cd)
 {
     Logger::println("Adding data from class: %s", cd->toChars());
     LOG_SCOPE;
@@ -125,7 +125,7 @@
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void DtoResolveInterface(InterfaceDeclaration* cd)
+static void DtoResolveInterface(InterfaceDeclaration* cd)
 {
     if (cd->ir.resolved) return;
     cd->ir.resolved = true;
@@ -275,7 +275,7 @@
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void DtoDeclareInterface(InterfaceDeclaration* cd)
+static void DtoDeclareInterface(InterfaceDeclaration* cd)
 {
     if (cd->ir.declared) return;
     cd->ir.declared = true;
@@ -440,7 +440,7 @@
 //////////////////////////////////////////////////////////////////////////////
 
 // adds data fields and interface vtables to the constant initializer of class cd
-size_t init_class_initializer(std::vector<LLConstant*>& inits, ClassDeclaration* target, ClassDeclaration* cd, size_t offsetbegin)
+static size_t init_class_initializer(std::vector<LLConstant*>& inits, ClassDeclaration* target, ClassDeclaration* cd, size_t offsetbegin)
 {
     // first do baseclasses
     if (cd->baseClass)
@@ -543,7 +543,7 @@
 //////////////////////////////////////////////////////////////////////////////
 
 // build the vtable initializer for class cd
-void init_class_vtbl_initializer(ClassDeclaration* cd)
+static void init_class_vtbl_initializer(ClassDeclaration* cd)
 {
     // generate vtable initializer
     std::vector<LLConstant*> sinits(cd->vtbl.dim, NULL);
@@ -596,7 +596,7 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-void init_class_interface_vtbl_initializers(ClassDeclaration* cd)
+static void init_class_interface_vtbl_initializers(ClassDeclaration* cd)
 {
     IrStruct* irstruct = cd->ir.irStruct;
 
@@ -697,7 +697,7 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-void DtoConstInitInterface(InterfaceDeclaration* cd)
+static void DtoConstInitInterface(InterfaceDeclaration* cd)
 {
     if (cd->ir.initialized) return;
     cd->ir.initialized = true;
@@ -780,7 +780,7 @@
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void DefineInterfaceInfos(IrStruct* irstruct)
+static void DefineInterfaceInfos(IrStruct* irstruct)
 {
     // always do interface info array when possible
     std::vector<LLConstant*> infoInits;
@@ -810,7 +810,7 @@
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void DtoDefineInterface(InterfaceDeclaration* cd)
+static void DtoDefineInterface(InterfaceDeclaration* cd)
 {
     if (cd->ir.defined) return;
     cd->ir.defined = true;
@@ -1323,7 +1323,7 @@
 #if GENERATE_OFFTI
 
 // build a single element for the OffsetInfo[] of ClassInfo
-LLConstant* build_offti_entry(ClassDeclaration* cd, VarDeclaration* vd)
+static LLConstant* build_offti_entry(ClassDeclaration* cd, VarDeclaration* vd)
 {
     std::vector<LLConstant*> inits(2);
 
@@ -1348,7 +1348,7 @@
     return llvm::ConstantStruct::get(inits);
 }
 
-LLConstant* build_offti_array(ClassDeclaration* cd, const LLType* arrayT)
+static LLConstant* build_offti_array(ClassDeclaration* cd, const LLType* arrayT)
 {
     IrStruct* irstruct = cd->ir.irStruct;
 
@@ -1383,7 +1383,7 @@
 
 #endif // GENERATE_OFFTI
 
-LLConstant* build_class_dtor(ClassDeclaration* cd)
+static LLConstant* build_class_dtor(ClassDeclaration* cd)
 {
     FuncDeclaration* dtor = cd->dtor;
 
@@ -1395,7 +1395,7 @@
     return llvm::ConstantExpr::getBitCast(dtor->ir.irFunc->func, getPtrToType(LLType::Int8Ty));
 }
 
-unsigned build_classinfo_flags(ClassDeclaration* cd)
+static unsigned build_classinfo_flags(ClassDeclaration* cd)
 {
     // adapted from original dmd code
     unsigned flags = 0;