diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-01-15 15:37:28 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-01-15 15:37:28 +0000 |
| commit | 829000e035f46f2a227a5466e4e427a2f3cc00a9 (patch) | |
| tree | be5a687969f682edded4aa6f13594ffd9aa9030e /lib/VMCore/IntrinsicInst.cpp | |
| parent | 1e7804dbd25b8dbf534c850355d70ad215206f4b (diff) | |
Notes
Diffstat (limited to 'lib/VMCore/IntrinsicInst.cpp')
| -rw-r--r-- | lib/VMCore/IntrinsicInst.cpp | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/lib/VMCore/IntrinsicInst.cpp b/lib/VMCore/IntrinsicInst.cpp index 5e0f42e063bf..cb9252efdf58 100644 --- a/lib/VMCore/IntrinsicInst.cpp +++ b/lib/VMCore/IntrinsicInst.cpp @@ -8,11 +8,7 @@ //===----------------------------------------------------------------------===// // // This file implements methods that make it really easy to deal with intrinsic -// functions with the isa/dyncast family of functions. In particular, this -// allows you to do things like: -// -// if (DbgStopPointInst *SPI = dyn_cast<DbgStopPointInst>(Inst)) -// ... SPI->getFileName() ... SPI->getDirectory() ... +// functions. // // All intrinsic function calls are instances of the call instruction, so these // are all subclasses of the CallInst class. Note that none of these classes @@ -55,25 +51,13 @@ Value *DbgInfoIntrinsic::StripCast(Value *C) { } //===----------------------------------------------------------------------===// -/// DbgStopPointInst - This represents the llvm.dbg.stoppoint instruction. +/// DbgValueInst - This represents the llvm.dbg.value instruction. /// -Value *DbgStopPointInst::getFileName() const { - // Once the operand indices are verified, update this assert - assert(LLVMDebugVersion == (7 << 16) && "Verify operand indices"); - return getContext()->getOperand(3); -} - -Value *DbgStopPointInst::getDirectory() const { - // Once the operand indices are verified, update this assert - assert(LLVMDebugVersion == (7 << 16) && "Verify operand indices"); - return getContext()->getOperand(4); +const Value *DbgValueInst::getValue() const { + return cast<MDNode>(getOperand(1))->getOperand(0); } -//===----------------------------------------------------------------------===// -/// DbgValueInst - This represents the llvm.dbg.value instruction. -/// - -Value *DbgValueInst::getValue() const { +Value *DbgValueInst::getValue() { return cast<MDNode>(getOperand(1))->getOperand(0); } |
