diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-08 22:05:54 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-08 22:05:54 +0000 |
commit | 69a34cddaf00ebd4ffdcbda15db0333134298703 (patch) | |
tree | 2358e4ea650081cf5df095d0bdb526e1cb31bea7 /lib/CodeGen | |
parent | bc55a3140ca0f9e7b3d63d3efea5921f906446ed (diff) | |
download | external_llvm-69a34cddaf00ebd4ffdcbda15db0333134298703.zip external_llvm-69a34cddaf00ebd4ffdcbda15db0333134298703.tar.gz external_llvm-69a34cddaf00ebd4ffdcbda15db0333134298703.tar.bz2 |
Value cannot be directly instantiated. I think that this code was TRYING to
make a PHI node, although it was badly broken. This keeps tests passing, so
we'll go with it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2184 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/InstrSelection/InstrSelection.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/CodeGen/InstrSelection/InstrSelection.cpp b/lib/CodeGen/InstrSelection/InstrSelection.cpp index 1eb507a..583df38 100644 --- a/lib/CodeGen/InstrSelection/InstrSelection.cpp +++ b/lib/CodeGen/InstrSelection/InstrSelection.cpp @@ -202,11 +202,9 @@ InsertCode4AllPhisInMeth(Function *F, TargetMachine &target) // for( ; IIt != InstList.end(); ++IIt ) { - if( (*IIt)->getOpcode() == Instruction::PHINode ) { - - PHINode *PN = (PHINode *) (*IIt); - - Value *PhiCpRes = new Value(PN->getType(),PN->getValueType(),"PhiCp:"); + if (PHINode *PN = dyn_cast<PHINode>(*IIt)) { + // FIXME: This is probably wrong... + Value *PhiCpRes = new PHINode(PN->getType(), "PhiCp:"); // for each incoming value of the phi, insert phi elimination // |