From 0c0bac27665e7c343a23d2218406825e124b8c10 Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Wed, 23 Jan 2008 12:56:09 +0100 Subject: [PATCH] [svn r144] fixes --- gen/todebug.cpp | 7 ++- ir/irstruct.h | 10 +++- llvmdc.kdevelop | 88 ++++++++++++++++++++++++++++++++ llvmdc.kdevelop.filelist | 1 + tango/lib/compiler/llvmdc/cast.d | 2 +- tangotests/u.d | 9 ++++ 6 files changed, 113 insertions(+), 4 deletions(-) create mode 100644 tangotests/u.d diff --git a/gen/todebug.cpp b/gen/todebug.cpp index a8181b9c..c0b02b46 100644 --- a/gen/todebug.cpp +++ b/gen/todebug.cpp @@ -135,8 +135,11 @@ llvm::GlobalVariable* DtoDwarfCompileUnit(Module* m) vals.push_back(DtoConstUint(DW_LANG_C));// _D)); // doesn't seem to work vals.push_back(DtoConstStringPtr(m->srcfile->name->toChars(), "llvm.metadata")); std::string srcpath(FileName::path(m->srcfile->name->toChars())); - if (srcpath.empty()) - srcpath = "."; + if (srcpath.empty()) { + const char* str = get_current_dir_name(); + assert(str != NULL); + srcpath = str; + } vals.push_back(DtoConstStringPtr(srcpath.c_str(), "llvm.metadata")); vals.push_back(DtoConstStringPtr("LLVMDC (http://www.dsource.org/projects/llvmdc)", "llvm.metadata")); diff --git a/ir/irstruct.h b/ir/irstruct.h index dab1e527..9b4ed98a 100644 --- a/ir/irstruct.h +++ b/ir/irstruct.h @@ -42,9 +42,17 @@ struct IrStruct : IrBase : var(v), type(ty), init(NULL) {} }; + struct InterCmp + { + bool operator()(ClassDeclaration* lhs, ClassDeclaration* rhs) const + { + return strcmp(lhs->toPrettyChars(), rhs->toPrettyChars()) < 0; + } + }; + typedef std::multimap OffsetMap; typedef std::vector VarDeclVector; - typedef std::map InterfaceMap; + typedef std::map InterfaceMap; typedef InterfaceMap::iterator InterfaceIter; public: diff --git a/llvmdc.kdevelop b/llvmdc.kdevelop index 5e88b376..9faf4f20 100644 --- a/llvmdc.kdevelop +++ b/llvmdc.kdevelop @@ -574,6 +574,94 @@ dmd25/utf.h dmd25/version.c dmd25/version.h + dmd26 + dmd26/access.c + dmd26/aggregate.h + dmd26/array.c + dmd26/arraytypes.h + dmd26/attrib.c + dmd26/attrib.h + dmd26/cast.c + dmd26/class.c + dmd26/complex_t.h + dmd26/cond.c + dmd26/cond.h + dmd26/constfold.c + dmd26/dchar.c + dmd26/dchar.h + dmd26/declaration.c + dmd26/declaration.h + dmd26/delegatize.c + dmd26/doc.c + dmd26/doc.h + dmd26/dsymbol.c + dmd26/dsymbol.h + dmd26/dump.c + dmd26/entity.c + dmd26/enum.c + dmd26/enum.h + dmd26/expression.c + dmd26/expression.h + dmd26/func.c + dmd26/gnuc.c + dmd26/gnuc.h + dmd26/hdrgen.c + dmd26/hdrgen.h + dmd26/html.c + dmd26/html.h + dmd26/identifier.c + dmd26/identifier.h + dmd26/idgen.c + dmd26/impcnvgen.c + dmd26/import.c + dmd26/import.h + dmd26/inifile.c + dmd26/init.c + dmd26/init.h + dmd26/inline.c + dmd26/interpret.c + dmd26/lexer.c + dmd26/lexer.h + dmd26/link.c + dmd26/lstring.c + dmd26/lstring.h + dmd26/macro.c + dmd26/macro.h + dmd26/mangle.c + dmd26/mars.c + dmd26/mars.h + dmd26/mem.c + dmd26/mem.h + dmd26/module.c + dmd26/module.h + dmd26/mtype.c + dmd26/mtype.h + dmd26/opover.c + dmd26/optimize.c + dmd26/parse.c + dmd26/parse.h + dmd26/port.h + dmd26/root.c + dmd26/root.h + dmd26/scope.c + dmd26/scope.h + dmd26/statement.c + dmd26/statement.h + dmd26/staticassert.c + dmd26/staticassert.h + dmd26/stringtable.c + dmd26/stringtable.h + dmd26/struct.c + dmd26/template.c + dmd26/template.h + dmd26/total.h + dmd26/unialpha.c + dmd26/utf.c + dmd26/utf.h + dmd26/version.c + dmd26/version.h + todo + todo/lib.d make diff --git a/llvmdc.kdevelop.filelist b/llvmdc.kdevelop.filelist index 222088b8..44511ee5 100644 --- a/llvmdc.kdevelop.filelist +++ b/llvmdc.kdevelop.filelist @@ -140,6 +140,7 @@ gen/typeinf.h gen/typinf.cpp ir ir/ir.h +ir/irforw.h ir/irfunction.cpp ir/irfunction.h ir/irmodule.cpp diff --git a/tango/lib/compiler/llvmdc/cast.d b/tango/lib/compiler/llvmdc/cast.d index 2c9ae6e4..dcff9817 100644 --- a/tango/lib/compiler/llvmdc/cast.d +++ b/tango/lib/compiler/llvmdc/cast.d @@ -27,7 +27,7 @@ extern (C): -//debug = PRINTF; +debug = PRINTF; debug(PRINTF) int printf(char*, ...); /****************************************** diff --git a/tangotests/u.d b/tangotests/u.d new file mode 100644 index 00000000..2068f362 --- /dev/null +++ b/tangotests/u.d @@ -0,0 +1,9 @@ +import tango.io.Console; +void main() +{ + Cout("getting name std").newline; + Cerr("getting name err").newline; + auto s = Cin.get(); + Cout("putting name").newline; + Cout (s).newline; +}