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

Chris Lattner lattner at cs.uiuc.edu
Thu May 1 16:04:01 PDT 2003


Changes in directory llvm/lib/Transforms:

LevelRaise.cpp updated: 1.79 -> 1.80

---
Log message:

Fix bug: LevelRaise/2003-05-01-CallCast.ll


---
Diffs of the changes:

Index: llvm/lib/Transforms/LevelRaise.cpp
diff -u llvm/lib/Transforms/LevelRaise.cpp:1.79 llvm/lib/Transforms/LevelRaise.cpp:1.80
--- llvm/lib/Transforms/LevelRaise.cpp:1.79	Sun Apr 27 20:25:38 2003
+++ llvm/lib/Transforms/LevelRaise.cpp	Thu May  1 16:02:53 2003
@@ -491,7 +491,8 @@
     const FunctionType *FTy = cast<FunctionType>(PTy->getElementType());
 
     // Is the call to a vararg variable with no real parameters?
-    if (FTy->isVarArg() && FTy->getNumParams() == 0) {
+    if (FTy->isVarArg() && FTy->getNumParams() == 0 &&
+        !CI->getCalledFunction()) {
       // If so, insert a new cast instruction, casting it to a function type
       // that matches the current arguments...
       //





More information about the llvm-commits mailing list