Mercurial > projects > ldc
comparison gen/runtime.cpp @ 314:8d98e42ece93 trunk
[svn r335] The basics of exception handling are in place.
Still need to make sure calls are turned into invokes everywhere. (NewExpression for instance)
Still some rough edges and corner cases to figure out.
Needs testing!
author | ChristianK |
---|---|
date | Wed, 02 Jul 2008 22:20:18 +0200 |
parents | d59c363fccad |
children | 385a18242485 |
comparison
equal
deleted
inserted
replaced
313:a498b736a0bd | 314:8d98e42ece93 |
---|---|
878 types.push_back(objectTy); | 878 types.push_back(objectTy); |
879 const llvm::FunctionType* fty = llvm::FunctionType::get(voidTy, types, false); | 879 const llvm::FunctionType* fty = llvm::FunctionType::get(voidTy, types, false); |
880 llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M); | 880 llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M); |
881 llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname2, M); | 881 llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname2, M); |
882 } | 882 } |
883 | |
884 ///////////////////////////////////////////////////////////////////////////////////// | |
885 ///////////////////////////////////////////////////////////////////////////////////// | |
886 ///////////////////////////////////////////////////////////////////////////////////// | |
887 | |
888 // int _d_eh_personality(int ver, int actions, ulong eh_class, ptr eh_info, ptr context) | |
889 { | |
890 std::string fname("_d_eh_personality"); | |
891 std::vector<const LLType*> types; | |
892 types.push_back(intTy); | |
893 types.push_back(intTy); | |
894 types.push_back(longTy); | |
895 types.push_back(voidPtrTy); | |
896 types.push_back(voidPtrTy); | |
897 const llvm::FunctionType* fty = llvm::FunctionType::get(intTy, types, false); | |
898 llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M); | |
899 } | |
900 | |
901 // void _d_eh_resume_unwind(ptr exc_struct) | |
902 { | |
903 std::string fname("_d_eh_resume_unwind"); | |
904 std::vector<const LLType*> types; | |
905 types.push_back(voidPtrTy); | |
906 const llvm::FunctionType* fty = llvm::FunctionType::get(voidTy, types, false); | |
907 llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M); | |
908 } | |
883 } | 909 } |