]> granicus.if.org Git - clang/commitdiff
remove obviously dead code: you can't bitcast a pointer to "Ty" (a function type).
authorChris Lattner <sabre@nondot.org>
Sat, 21 Mar 2009 06:58:21 +0000 (06:58 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 21 Mar 2009 06:58:21 +0000 (06:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67436 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenModule.cpp

index a0024aa9bb5f4cdbb14672418d4d9dc0486203a3..af4add905d406958029de5520d087655db56fc01 100644 (file)
@@ -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 =