comparison gen/tocall.cpp @ 1030:3ead5c40b7d6

Disabled some extensive LLVM value logging with -vv that dramatically increases -vv output length for little value.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Tue, 03 Mar 2009 17:21:35 +0100
parents 9167d492cbc2
children 45af482e3832
comparison
equal deleted inserted replaced
1029:4d366a75d95f 1030:3ead5c40b7d6
440 args.push_back(arg); 440 args.push_back(arg);
441 } 441 }
442 } 442 }
443 } 443 }
444 444
445 #if 1 445 #if 0
446 if (Logger::enabled()) 446 if (Logger::enabled())
447 { 447 {
448 Logger::println("%lu params passed", args.size()); 448 Logger::println("%lu params passed", args.size());
449 for (int i=0; i<args.size(); ++i) { 449 for (int i=0; i<args.size(); ++i) {
450 assert(args[i]); 450 assert(args[i]);
451 Logger::cout() << "arg["<<i<<"] = " << *args[i] << '\n'; 451 Logger::cout() << "arg["<<i<<"] = " << *args[i] << '\n';
452 } 452 }
453 } 453 }
454 #endif 454 #endif
455 455
456 // void returns cannot not be named 456 // void returns cannot not be named
457 const char* varname = ""; 457 const char* varname = "";
458 if (callableTy->getReturnType() != LLType::VoidTy) 458 if (callableTy->getReturnType() != LLType::VoidTy)
459 varname = "tmp"; 459 varname = "tmp";
460 460
461 #if 0
461 if (Logger::enabled()) 462 if (Logger::enabled())
462 Logger::cout() << "Calling: " << *callable << '\n'; 463 Logger::cout() << "Calling: " << *callable << '\n';
464 #endif
463 465
464 // call the function 466 // call the function
465 LLCallSite call = gIR->CreateCallOrInvoke(callable, args.begin(), args.end(), varname); 467 LLCallSite call = gIR->CreateCallOrInvoke(callable, args.begin(), args.end(), varname);
466 468
467 // get return value 469 // get return value