[llvm-commits] CVS: llvm/lib/Transforms/ExprTypeConvert.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Feb 13 21:08:00 PST 2003


Changes in directory llvm/lib/Transforms:

ExprTypeConvert.cpp updated: 1.68 -> 1.69

---
Log message:

Fix bug: LevelRaise/2003-02-13-CallRaise.ll


---
Diffs of the changes:

Index: llvm/lib/Transforms/ExprTypeConvert.cpp
diff -u llvm/lib/Transforms/ExprTypeConvert.cpp:1.68 llvm/lib/Transforms/ExprTypeConvert.cpp:1.69
--- llvm/lib/Transforms/ExprTypeConvert.cpp:1.68	Thu Jan 30 11:10:41 2003
+++ llvm/lib/Transforms/ExprTypeConvert.cpp	Thu Feb 13 21:07:17 2003
@@ -512,6 +512,8 @@
     const FunctionType *NewTy =
       FunctionType::get(Ty, ArgTys, FT->isVarArg());
     const PointerType *NewPTy = PointerType::get(NewTy);
+    if (Ty == Type::VoidTy)
+      Name = "";  // Make sure not to name calls that now return void!
 
     Res = new CallInst(Constant::getNullValue(NewPTy),
                        std::vector<Value*>(I->op_begin()+1, I->op_end()),
@@ -1153,6 +1155,9 @@
       const PointerType *NewPTy = cast<PointerType>(NewVal->getType());
       const FunctionType *NewTy = cast<FunctionType>(NewPTy->getElementType());
       const FunctionType::ParamTypes &PTs = NewTy->getParamTypes();
+
+      if (NewTy->getReturnType() == Type::VoidTy)
+        Name = "";  // Make sure not to name a void call!
 
       // Get an iterator to the call instruction so that we can insert casts for
       // operands if needbe.  Note that we do not require operands to be





More information about the llvm-commits mailing list