DisableGVCompilation should not abort on internal GlobalValue's.
[oota-llvm.git] / include / llvm / IntrinsicInst.h
index 494eaaec4de99cca2eeca36d767b9ab6ce0d539f..1877eec38f25036e9c21b5aadf6f8f3453dfbcd3 100644 (file)
@@ -96,8 +96,8 @@ namespace llvm {
       return unsigned(cast<ConstantInt>(getOperand(2))->getZExtValue());
     }
     
-    std::string getFileName() const;
-    std::string getDirectory() const;
+    Value* getFileName() const;
+    Value* getDirectory() const;
 
     // Methods for support type inquiry through isa, cast, and dyn_cast:
     static inline bool classof(const DbgStopPointInst *) { return true; }
@@ -183,7 +183,7 @@ namespace llvm {
     /// 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.
-    Value *getDest() const { return StripPointerCasts(getRawDest()); }
+    Value *getDest() const { return getRawDest()->stripPointerCasts(); }
 
     /// set* - Set the specified arguments of the instruction.
     ///
@@ -208,12 +208,9 @@ namespace llvm {
     static inline bool classof(const MemIntrinsic *) { return true; }
     static inline bool classof(const IntrinsicInst *I) {
       switch (I->getIntrinsicID()) {
-      case Intrinsic::memcpy_i32:
-      case Intrinsic::memcpy_i64:
-      case Intrinsic::memmove_i32:
-      case Intrinsic::memmove_i64:
-      case Intrinsic::memset_i32:
-      case Intrinsic::memset_i64:
+      case Intrinsic::memcpy:
+      case Intrinsic::memmove:
+      case Intrinsic::memset:
         return true;
       default: return false;
       }
@@ -234,7 +231,7 @@ namespace llvm {
     /// getSource - This is just like getRawSource, but it strips off any cast
     /// instructions that feed it, giving the original input.  The returned
     /// value is guaranteed to be a pointer.
-    Value *getSource() const { return StripPointerCasts(getRawSource()); }
+    Value *getSource() const { return getRawSource()->stripPointerCasts(); }
 
 
     void setSource(Value *Ptr) {
@@ -246,8 +243,7 @@ namespace llvm {
     // Methods for support type inquiry through isa, cast, and dyn_cast:
     static inline bool classof(const MemCpyInst *) { return true; }
     static inline bool classof(const IntrinsicInst *I) {
-      return I->getIntrinsicID() == Intrinsic::memcpy_i32 ||
-             I->getIntrinsicID() == Intrinsic::memcpy_i64;
+      return I->getIntrinsicID() == Intrinsic::memcpy;
     }
     static inline bool classof(const Value *V) {
       return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
@@ -264,7 +260,7 @@ namespace llvm {
     /// getSource - This is just like getRawSource, but it strips off any cast
     /// instructions that feed it, giving the original input.  The returned
     /// value is guaranteed to be a pointer.
-    Value *getSource() const { return StripPointerCasts(getRawSource()); }
+    Value *getSource() const { return getRawSource()->stripPointerCasts(); }
 
     void setSource(Value *Ptr) {
       assert(getRawSource()->getType() == Ptr->getType() &&
@@ -275,8 +271,7 @@ namespace llvm {
     // Methods for support type inquiry through isa, cast, and dyn_cast:
     static inline bool classof(const MemMoveInst *) { return true; }
     static inline bool classof(const IntrinsicInst *I) {
-      return I->getIntrinsicID() == Intrinsic::memmove_i32 ||
-             I->getIntrinsicID() == Intrinsic::memmove_i64;
+      return I->getIntrinsicID() == Intrinsic::memmove;
     }
     static inline bool classof(const Value *V) {
       return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
@@ -299,14 +294,27 @@ namespace llvm {
     // Methods for support type inquiry through isa, cast, and dyn_cast:
     static inline bool classof(const MemSetInst *) { return true; }
     static inline bool classof(const IntrinsicInst *I) {
-      return I->getIntrinsicID() == Intrinsic::memset_i32 ||
-             I->getIntrinsicID() == Intrinsic::memset_i64;
+      return I->getIntrinsicID() == Intrinsic::memset;
     }
     static inline bool classof(const Value *V) {
       return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
     }
   };
 
+  /// EHSelectorInst - This represents the llvm.eh.selector instruction.
+  ///
+  struct EHSelectorInst : public IntrinsicInst {
+    // Methods for support type inquiry through isa, cast, and dyn_cast:
+    static inline bool classof(const EHSelectorInst *) { return true; }
+    static inline bool classof(const IntrinsicInst *I) {
+      return I->getIntrinsicID() == Intrinsic::eh_selector_i32 ||
+             I->getIntrinsicID() == Intrinsic::eh_selector_i64;
+    }
+    static inline bool classof(const Value *V) {
+      return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
+    }
+  };
+  
 }
 
 #endif