#define LLVM_INTRINSICINST_H
#include "llvm/Constants.h"
-#include "llvm/Metadata.h"
#include "llvm/Function.h"
#include "llvm/Instructions.h"
#include "llvm/Intrinsics.h"
/// DbgValueInst - This represents the llvm.dbg.value instruction.
///
struct DbgValueInst : public DbgInfoIntrinsic {
- Value *getValue() const {
- return cast<MDNode>(getOperand(1))->getOperand(0);
- }
+ Value *getValue() const;
Value *getOffset() const { return getOperand(2); }
MDNode *getVariable() const { return cast<MDNode>(getOperand(3)); }
class ValueHandleBase;
class LLVMContext;
class Twine;
+class MDNode;
//===----------------------------------------------------------------------===//
// Value Class
return isa<GlobalVariable>(Val) || isa<Function>(Val) ||
isa<GlobalAlias>(Val);
}
+template <> inline bool isa_impl<MDNode, Value>(const Value &Val) {
+ return Val.getValueID() == Value::MDNodeVal;
+}
// Value* is only 4-byte aligned.
assert(LLVMDebugVersion == (7 << 16) && "Verify operand indices");
return getContext()->getOperand(4);
}
+
+//===----------------------------------------------------------------------===//
+/// DbgValueInst - This represents the llvm.dbg.value instruction.
+///
+
+Value *DbgValueInst::getValue() const {
+ return cast<MDNode>(getOperand(1))->getOperand(0);
+}