diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-21 10:49:05 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-21 10:49:05 +0000 |
| commit | 2f12f10af369d468b14617276446166383d692ed (patch) | |
| tree | 2caca31db4facdc95c23930c0c745c8ef0dee97d /lib/VMCore | |
| parent | c69102774f9739c81ae1285ed9ae62405071c63c (diff) | |
Notes
Diffstat (limited to 'lib/VMCore')
| -rw-r--r-- | lib/VMCore/AsmWriter.cpp | 9 | ||||
| -rw-r--r-- | lib/VMCore/Verifier.cpp | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index fd742413abf10..0eb9f020dc9a2 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -1027,6 +1027,15 @@ static void WriteConstantInt(raw_ostream &Out, const Constant *CV, return; } + if (const ConstantUnion *CU = dyn_cast<ConstantUnion>(CV)) { + Out << "{ "; + TypePrinter.print(CU->getOperand(0)->getType(), Out); + Out << ' '; + WriteAsOperandInternal(Out, CU->getOperand(0), &TypePrinter, Machine); + Out << " }"; + return; + } + if (const ConstantVector *CP = dyn_cast<ConstantVector>(CV)) { const Type *ETy = CP->getType()->getElementType(); assert(CP->getNumOperands() > 0 && diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 721e96a0f552a..f1413825697a5 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -1623,10 +1623,6 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) { MDNode *MD = cast<MDNode>(CI.getOperand(1)); Assert1(MD->getNumOperands() == 1, "invalid llvm.dbg.declare intrinsic call 2", &CI); - if (MD->getOperand(0)) - if (Constant *C = dyn_cast<Constant>(MD->getOperand(0))) - Assert1(C && !isa<ConstantPointerNull>(C), - "invalid llvm.dbg.declare intrinsic call 3", &CI); } break; case Intrinsic::memcpy: case Intrinsic::memmove: |
