Mercurial > projects > ldc
comparison gen/runtime.c @ 40:8b0e809563df trunk
[svn r44] Lots of bug fixes.
New array literal support
New array ~= operator support (for single element)
New with statement support
More...
author | lindquist |
---|---|
date | Fri, 19 Oct 2007 07:43:21 +0200 |
parents | 3cfcb944304e |
children | 0c77619e803b |
comparison
equal
deleted
inserted
replaced
39:fd5e8bbfcb25 | 40:8b0e809563df |
---|---|
68 assert(!runtime_failed); | 68 assert(!runtime_failed); |
69 LLVM_D_InitRuntime(); | 69 LLVM_D_InitRuntime(); |
70 } | 70 } |
71 | 71 |
72 llvm::Function* fn = M->getFunction(name); | 72 llvm::Function* fn = M->getFunction(name); |
73 if (!fn) | 73 if (!fn) { |
74 return NULL; | 74 error("Runtime function '%s' was not found", name); |
75 fatal(); | |
76 //return NULL; | |
77 } | |
75 | 78 |
76 const llvm::FunctionType* fnty = fn->getFunctionType(); | 79 const llvm::FunctionType* fnty = fn->getFunctionType(); |
77 return llvm::cast<llvm::Function>(target->getOrInsertFunction(name, fnty)); | 80 return llvm::cast<llvm::Function>(target->getOrInsertFunction(name, fnty)); |
78 } | 81 } |
82 |