comparison dmd/attrib.c @ 486:a34078905d01

Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in. Reimplemented support for nested functions/class using a new approach. Added error on taking address of intrinsic. Fixed problems with the ->syntaxCopy of TypeFunction delegate exp. Removed DtoDType and replaced all uses with ->toBasetype() instead. Removed unused inplace stuff. Fixed a bunch of issues in the runtime unittests, not complete yet. Added mini tests.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Sun, 10 Aug 2008 08:37:38 +0200
parents cc40db549aea
children cecfee2d01a8
comparison
equal deleted inserted replaced
485:50f6e2337a6b 486:a34078905d01
829 #endif 829 #endif
830 830
831 // LLVMDC 831 // LLVMDC
832 #if IN_LLVM 832 #if IN_LLVM
833 833
834 // pragma(intrinsic, string) { funcdecl(s) } 834 // pragma(intrinsic, "string") { funcdecl(s) }
835 else if (ident == Id::intrinsic) 835 else if (ident == Id::intrinsic)
836 { 836 {
837 Expression* expr = (Expression *)args->data[0]; 837 Expression* expr = (Expression *)args->data[0];
838 expr = expr->semantic(sc); 838 expr = expr->semantic(sc);
839 if (!args || args->dim != 1 || !parseStringExp(expr, arg1str)) 839 if (!args || args->dim != 1 || !parseStringExp(expr, arg1str))
917 { 917 {
918 error("pragma va_arg takes no parameters"); 918 error("pragma va_arg takes no parameters");
919 fatal(); 919 fatal();
920 } 920 }
921 llvm_internal = LLVMva_arg; 921 llvm_internal = LLVMva_arg;
922 }
923
924 // pragma(llvmdc, "string") { templdecl(s) }
925 else if (ident == Id::llvmdc)
926 {
927 Expression* expr = (Expression *)args->data[0];
928 expr = expr->semantic(sc);
929 if (!args || args->dim != 1 || !parseStringExp(expr, arg1str))
930 {
931 error("pragma llvmdc requires exactly 1 string literal parameter");
932 fatal();
933 }
934 else if (arg1str == "verbose")
935 {
936 sc->module->llvmForceLogging = true;
937 }
938 else
939 {
940 error("pragma llvmdc command '%s' invalid");
941 fatal();
942 }
922 } 943 }
923 944
924 #endif // LLVMDC 945 #endif // LLVMDC
925 946
926 else if (global.params.ignoreUnsupportedPragmas) 947 else if (global.params.ignoreUnsupportedPragmas)