From b59761b2530bf54926bf67de11956f3820ac38d9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 1 Jul 2009 04:13:52 +0000 Subject: [PATCH] use new and simplified LLVM APIs. Patch by Jay Foad! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74585 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGObjCGNU.cpp | 5 ++--- lib/CodeGen/CGObjCMac.cpp | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp index 230017b2dc..1e2218f809 100644 --- a/lib/CodeGen/CGObjCGNU.cpp +++ b/lib/CodeGen/CGObjCGNU.cpp @@ -1158,9 +1158,8 @@ llvm::Function *CGObjCGNU::ModuleInitFunction() { // Create the load function calling the runtime entry point with the module // structure - std::vector VoidArgs; llvm::Function * LoadFunction = llvm::Function::Create( - llvm::FunctionType::get(llvm::Type::VoidTy, VoidArgs, false), + llvm::FunctionType::get(llvm::Type::VoidTy, false), llvm::GlobalValue::InternalLinkage, ".objc_load_function", &TheModule); llvm::BasicBlock *EntryBB = llvm::BasicBlock::Create("entry", LoadFunction); @@ -1245,7 +1244,7 @@ void CGObjCGNU::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF, // Pointer to the personality function llvm::Constant *Personality = CGM.CreateRuntimeFunction(llvm::FunctionType::get(llvm::Type::Int32Ty, - std::vector(), true), + true), "__gnu_objc_personality_v0"); Personality = llvm::ConstantExpr::getBitCast(Personality, PtrTy); std::vector Params; diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index 2e162e81a8..c3354574c7 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -690,7 +690,6 @@ public: llvm::Value *getEHPersonalityPtr() { llvm::Constant *Personality = CGM.CreateRuntimeFunction(llvm::FunctionType::get(llvm::Type::Int32Ty, - std::vector(), true), "__objc_personality_v0"); return llvm::ConstantExpr::getBitCast(Personality, Int8PtrTy); @@ -705,9 +704,8 @@ public: } llvm::Constant *getObjCEndCatchFn() { - std::vector Params; return CGM.CreateRuntimeFunction(llvm::FunctionType::get(llvm::Type::VoidTy, - Params, false), + false), "objc_end_catch"); } -- 2.40.0