diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-21 06:58:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-21 06:58:21 +0000 |
commit | 6098e62d568886d8af093527e71a1fc11f023bf9 (patch) | |
tree | c0bda75d82bae59a62a2c47757a252e934f1d7dc /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | cbeda87da143c463f4ea4cc6c87d4ca148b8e099 (diff) | |
download | bcm5719-llvm-6098e62d568886d8af093527e71a1fc11f023bf9.tar.gz bcm5719-llvm-6098e62d568886d8af093527e71a1fc11f023bf9.zip |
remove obviously dead code: you can't bitcast a pointer to "Ty" (a function type).
llvm-svn: 67436
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index a0024aa9bb5..af4add905d4 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -956,11 +956,7 @@ llvm::Value *CodeGenModule::getBuiltinLibFunction(unsigned BuiltinID) { llvm::GlobalValue *&ExistingFn = GlobalDeclMap[getContext().Idents.get(Name).getName()]; - if (ExistingFn) { - if (ExistingFn->getType() == Ty) - return FunctionSlot = ExistingFn; - return FunctionSlot = llvm::ConstantExpr::getBitCast(ExistingFn, Ty); - } + assert(!ExistingFn && "Asking for the same builtin multiple times?"); // FIXME: param attributes for sext/zext etc. return FunctionSlot = ExistingFn = |