Mercurial > projects > ldc
comparison gen/abi-x86-64.cpp @ 1051:dc608dc33081
Make IrFuncTy a member of TypeFunction. Reset between modules compiled in the
same LDC call.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 07 Mar 2009 14:25:30 +0100 |
parents | afe271b0e271 |
children | a3d7288c4473 |
comparison
equal
deleted
inserted
replaced
1050:32ead42679d1 | 1051:dc608dc33081 |
---|---|
645 // extern(D) is handled entirely by passByVal and returnInArg | 645 // extern(D) is handled entirely by passByVal and returnInArg |
646 | 646 |
647 if (tf->linkage != LINKd) { | 647 if (tf->linkage != LINKd) { |
648 // TODO: See if this is correct for more than just extern(C). | 648 // TODO: See if this is correct for more than just extern(C). |
649 | 649 |
650 IrFuncTy* fty = tf->fty; | 650 IrFuncTy& fty = tf->fty; |
651 | 651 |
652 if (!fty->arg_sret) { | 652 if (!fty.arg_sret) { |
653 Logger::println("x86-64 ABI: Transforming return type"); | 653 Logger::println("x86-64 ABI: Transforming return type"); |
654 Type* rt = fty->ret->type->toBasetype(); | 654 Type* rt = fty.ret->type->toBasetype(); |
655 if (rt != Type::tvoid) | 655 if (rt != Type::tvoid) |
656 fixup(*fty->ret); | 656 fixup(*fty.ret); |
657 } | 657 } |
658 | 658 |
659 | 659 |
660 Logger::println("x86-64 ABI: Transforming arguments"); | 660 Logger::println("x86-64 ABI: Transforming arguments"); |
661 LOG_SCOPE; | 661 LOG_SCOPE; |
662 | 662 |
663 for (IrFuncTy::ArgIter I = fty->args.begin(), E = fty->args.end(); I != E; ++I) { | 663 for (IrFuncTy::ArgIter I = fty.args.begin(), E = fty.args.end(); I != E; ++I) { |
664 IrFuncTyArg& arg = **I; | 664 IrFuncTyArg& arg = **I; |
665 | 665 |
666 if (Logger::enabled()) | 666 if (Logger::enabled()) |
667 Logger::cout() << "Arg: " << arg.type->toChars() << '\n'; | 667 Logger::cout() << "Arg: " << arg.type->toChars() << '\n'; |
668 | 668 |