Mercurial > projects > ldc
comparison gen/tocall.cpp @ 1571:8d086d552909
IntegerType is now contextifed.
Requires llvm >= 78969. resistor says this will be the last context API change :)
author | Benjamin Kramer <benny.kra@gmail.com> |
---|---|
date | Fri, 14 Aug 2009 00:39:18 +0200 |
parents | 755abafbf25d |
children | 207a8a438dea |
comparison
equal
deleted
inserted
replaced
1570:ab03cfb3a212 | 1571:8d086d552909 |
---|---|
219 Attr.Attrs = atts; | 219 Attr.Attrs = atts; |
220 attrs.push_back(Attr); | 220 attrs.push_back(Attr); |
221 } | 221 } |
222 ++argidx; | 222 ++argidx; |
223 | 223 |
224 args.push_back(gIR->ir->CreateBitCast(mem, getPtrToType(LLType::Int8Ty), "tmp")); | 224 args.push_back(gIR->ir->CreateBitCast(mem, getPtrToType(LLType::getInt8Ty(gIR->context())), "tmp")); |
225 if (unsigned atts = tf->fty.arg_argptr->attrs) { | 225 if (unsigned atts = tf->fty.arg_argptr->attrs) { |
226 Attr.Index = argidx; | 226 Attr.Index = argidx; |
227 Attr.Attrs = atts; | 227 Attr.Attrs = atts; |
228 attrs.push_back(Attr); | 228 attrs.push_back(Attr); |
229 } | 229 } |
527 } | 527 } |
528 #endif | 528 #endif |
529 | 529 |
530 // void returns cannot not be named | 530 // void returns cannot not be named |
531 const char* varname = ""; | 531 const char* varname = ""; |
532 if (callableTy->getReturnType() != LLType::VoidTy) | 532 if (callableTy->getReturnType() != LLType::getVoidTy(gIR->context())) |
533 varname = "tmp"; | 533 varname = "tmp"; |
534 | 534 |
535 #if 0 | 535 #if 0 |
536 if (Logger::enabled()) | 536 if (Logger::enabled()) |
537 Logger::cout() << "Calling: " << *callable << '\n'; | 537 Logger::cout() << "Calling: " << *callable << '\n'; |