#define LLVM_INTRINSICINST_H
#include "llvm/Constants.h"
-#include "llvm/Metadata.h"
#include "llvm/Function.h"
#include "llvm/Instructions.h"
#include "llvm/Intrinsics.h"
///
class DbgDeclareInst : public DbgInfoIntrinsic {
public:
- Value *getAddress() const {
- if (MDNode* MD = dyn_cast<MDNode>(getOperand(1)))
- return MD->getOperand(0);
- else
- return NULL;
- }
+ Value *getAddress() const;
MDNode *getVariable() const { return cast<MDNode>(getOperand(2)); }
// Methods for support type inquiry through isa, cast, and dyn_cast:
return getAlignmentCst()->getZExtValue();
}
+ ConstantInt *getVolatileCst() const {
+ return cast<ConstantInt>(const_cast<Value*>(getOperand(5)));
+ }
+ bool isVolatile() const {
+ return getVolatileCst()->getZExtValue() != 0;
+ }
+
/// getDest - This is just like getRawDest, but it strips off any cast
/// instructions that feed it, giving the original input. The returned
/// value is guaranteed to be a pointer.
void setAlignment(Constant* A) {
setOperand(4, A);
}
-
+
+ void setVolatile(Constant* V) {
+ setOperand(5, V);
+ }
+
const Type *getAlignmentType() const {
return getOperand(4)->getType();
}