#include <llvm/Support/Casting.h>
#include <iostream>

class A {
public:
static bool classof(const A *) { return true; }
};

class B : public A {
public:
static bool classof(const B *) { return true; }
static bool classof(const A *) { return true; }
};


int main() {
  A* a = new A;
  B* b = new B;
  
  std::cout << "isa<A>(a) = " << llvm::isa<A>(a) << "\n";
  std::cout << "isa<B>(a) = " << llvm::isa<B>(a) << "\n";
  std::cout << "isa<B>(b) = " << llvm::isa<B>(b) << "\n";
  std::cout << "isa<A>(b) = " << llvm::isa<A>(b) << "\n";
  std::cout << "\n";
  
  return 0;
}

