diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-08-02 23:29:23 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-08-02 23:29:23 +0000 |
| commit | eee90f7eb45b7bf201aefbb2663cedcc4240ceab (patch) | |
| tree | f68f064c9d0e7b7b9cd80ebd80e260510190edda | |
| parent | bd615f518c632f3b34aadb685b62ebac5e64df94 (diff) | |
| download | bcm5719-llvm-eee90f7eb45b7bf201aefbb2663cedcc4240ceab.tar.gz bcm5719-llvm-eee90f7eb45b7bf201aefbb2663cedcc4240ceab.zip | |
Change a place to use an arbitrary value instead of null, when possible
llvm-svn: 22605
| -rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index c060127e2c0..d8ede2734e5 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -849,13 +849,13 @@ bool llvm::SimplifyCFG(BasicBlock *BB) { while (!BB->empty()) { Instruction &I = BB->back(); // If this instruction is used, replace uses with an arbitrary - // constant value. Because control flow can't get here, we don't care + // value. Because control flow can't get here, we don't care // what we replace the value with. Note that since this block is // unreachable, and all values contained within it must dominate their // uses, that all uses will eventually be removed. if (!I.use_empty()) - // Make all users of this instruction reference the constant instead - I.replaceAllUsesWith(Constant::getNullValue(I.getType())); + // Make all users of this instruction use undef instead + I.replaceAllUsesWith(UndefValue::get(I.getType())); // Remove the instruction from the basic block BB->getInstList().pop_back(); |

