Make PseudoSourceValue's classof recognize
authorDan Gohman <gohman@apple.com>
Mon, 16 Nov 2009 20:40:06 +0000 (20:40 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 16 Nov 2009 20:40:06 +0000 (20:40 +0000)
FixedStackPseudoSourceValueVal, to respect this isa relationship.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88954 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/PseudoSourceValue.h

index 7b3b0381f77636752252ed6722c32ce4bcfa4b60..bace631ab9554cd00e76455dafdb43a368ea4944 100644 (file)
@@ -32,7 +32,7 @@ namespace llvm {
     virtual void printCustom(raw_ostream &O) const;
 
   public:
-    PseudoSourceValue(enum ValueTy Subclass = PseudoSourceValueVal);
+    explicit PseudoSourceValue(enum ValueTy Subclass = PseudoSourceValueVal);
 
     /// isConstant - Test whether the memory pointed to by this
     /// PseudoSourceValue has a constant value.
@@ -52,7 +52,8 @@ namespace llvm {
     ///
     static inline bool classof(const PseudoSourceValue *) { return true; }
     static inline bool classof(const Value *V) {
-      return V->getValueID() == PseudoSourceValueVal;
+      return V->getValueID() == PseudoSourceValueVal ||
+             V->getValueID() == FixedStackPseudoSourceValueVal;
     }
 
     /// A pseudo source value referencing a fixed stack frame entry,