diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-08-14 18:24:09 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-08-14 18:24:09 +0000 |
| commit | 330b7ac76ca31e49da0ee6a1a3349a6ff86e150b (patch) | |
| tree | 51d69482f788499c3448374bc4f60ddef53a7394 /llvm/lib/Transforms/Utils/Linker.cpp | |
| parent | b80b69cc3e6d865b4f4900bae758c3d6aeff7383 (diff) | |
| download | bcm5719-llvm-330b7ac76ca31e49da0ee6a1a3349a6ff86e150b.tar.gz bcm5719-llvm-330b7ac76ca31e49da0ee6a1a3349a6ff86e150b.zip | |
Remove support for Not ConstantExpr. This simplifies the unary case to only
have to support the cast instruction, so the function is renamed to getCast.
llvm-svn: 3328
Diffstat (limited to 'llvm/lib/Transforms/Utils/Linker.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Utils/Linker.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/Linker.cpp b/llvm/lib/Transforms/Utils/Linker.cpp index 48e40d0b3d9..21e25b444a1 100644 --- a/llvm/lib/Transforms/Utils/Linker.cpp +++ b/llvm/lib/Transforms/Utils/Linker.cpp @@ -119,10 +119,10 @@ static Value *RemapOperand(const Value *In, map<const Value*, Value*> &LocalMap, Result = ConstantPointerRef::get(cast<GlobalValue>(V)); } else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(CPV)) { if (CE->getNumOperands() == 1) { - // Cast instruction, unary operator + // Cast instruction + assert(CE->getOpcode() == Instruction::Cast); Value *V = RemapOperand(CE->getOperand(0), LocalMap, GlobalMap); - Result = ConstantExpr::get(CE->getOpcode(), cast<Constant>(V), - CE->getType()); + Result = ConstantExpr::getCast(cast<Constant>(V), CE->getType()); } else if (CE->getNumOperands() == 2) { // Binary operator... Value *V1 = RemapOperand(CE->getOperand(0), LocalMap, GlobalMap); |

