From f47a6b4882f45ecd4b2765d5d9051d973c96b58f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 26 Jan 2006 01:55:22 +0000 Subject: teach the cloner to handle inline asms git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25633 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/ValueMapper.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'lib/Transforms/Utils/ValueMapper.cpp') diff --git a/lib/Transforms/Utils/ValueMapper.cpp b/lib/Transforms/Utils/ValueMapper.cpp index ef03c6c102..134a0a2019 100644 --- a/lib/Transforms/Utils/ValueMapper.cpp +++ b/lib/Transforms/Utils/ValueMapper.cpp @@ -16,8 +16,6 @@ #include "llvm/Constants.h" #include "llvm/GlobalValue.h" #include "llvm/Instruction.h" -#include - using namespace llvm; Value *llvm::MapValue(const Value *V, std::map &VM) { @@ -32,7 +30,7 @@ Value *llvm::MapValue(const Value *V, std::map &VM) { if (Constant *C = const_cast(dyn_cast(V))) { if (isa(C) || isa(C) || isa(C) || isa(C) || - isa(C)) + isa(C) || isa(V)) return VMSlot = C; // Primitive constants map directly else if (ConstantArray *CA = dyn_cast(C)) { for (unsigned i = 0, e = CA->getNumOperands(); i != e; ++i) { @@ -112,12 +110,6 @@ void llvm::RemapInstruction(Instruction *I, for (unsigned op = 0, E = I->getNumOperands(); op != E; ++op) { const Value *Op = I->getOperand(op); Value *V = MapValue(Op, ValueMap); -#ifndef NDEBUG - if (!V) { - std::cerr << "Val = \n" << *Op << "Addr = " << (void*)Op; - std::cerr << "\nInst = " << *I; - } -#endif assert(V && "Referenced value not in value map!"); I->setOperand(op, V); } -- cgit v1.2.3