[opaque pointer types] Push the passing of value types up from Function/GlobalVariabl...
[oota-llvm.git] / include / llvm / IR / IntrinsicInst.h
index 72ab46d8af9abf5ac0cbdd017ee70cb7fcbf7ff8..2c8b6eb6f39aed5f8a8805b6f56677c7d12ff699 100644 (file)
@@ -42,7 +42,7 @@ namespace llvm {
     /// getIntrinsicID - Return the intrinsic ID of this intrinsic.
     ///
     Intrinsic::ID getIntrinsicID() const {
-      return (Intrinsic::ID)getCalledFunction()->getIntrinsicID();
+      return getCalledFunction()->getIntrinsicID();
     }
 
     // Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -82,8 +82,12 @@ namespace llvm {
   class DbgDeclareInst : public DbgInfoIntrinsic {
   public:
     Value *getAddress() const;
-    MDNode *getVariable() const { return cast<MDNode>(getRawVariable()); }
-    MDNode *getExpression() const { return cast<MDNode>(getRawExpression()); }
+    DILocalVariable *getVariable() const {
+      return cast<DILocalVariable>(getRawVariable());
+    }
+    DIExpression *getExpression() const {
+      return cast<DIExpression>(getRawExpression());
+    }
 
     Metadata *getRawVariable() const {
       return cast<MetadataAsValue>(getArgOperand(1))->getMetadata();
@@ -111,8 +115,12 @@ namespace llvm {
       return cast<ConstantInt>(
                           const_cast<Value*>(getArgOperand(1)))->getZExtValue();
     }
-    MDNode *getVariable() const { return cast<MDNode>(getRawVariable()); }
-    MDNode *getExpression() const { return cast<MDNode>(getRawExpression()); }
+    DILocalVariable *getVariable() const {
+      return cast<DILocalVariable>(getRawVariable());
+    }
+    DIExpression *getExpression() const {
+      return cast<DIExpression>(getRawExpression());
+    }
 
     Metadata *getRawVariable() const {
       return cast<MetadataAsValue>(getArgOperand(2))->getMetadata();