projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d248c5
)
Fix bug: LevelRaise/2003-05-01-CallCast.ll
author
Chris Lattner
<sabre@nondot.org>
Thu, 1 May 2003 21:02:53 +0000
(21:02 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 1 May 2003 21:02:53 +0000
(21:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5975
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/LevelRaise.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/LevelRaise.cpp
b/lib/Transforms/LevelRaise.cpp
index 2e9d8c2f8c810bdf5faec48d6714d789535e6d99..b2c6b05ab46fdabd71aabdee0f6e0852a08c4ecc 100644
(file)
--- a/
lib/Transforms/LevelRaise.cpp
+++ b/
lib/Transforms/LevelRaise.cpp
@@
-491,7
+491,8
@@
bool RPR::PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) {
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...
//