summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/AsmWriterEmitter.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-08-07 22:49:24 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-08-07 22:49:24 +0000
commit885e6382eb6aa3604cc931d11df78c9ec31b0740 (patch)
tree1c4bd54ea73e3d90fbc93b31bbf73888936e9079 /llvm/utils/TableGen/AsmWriterEmitter.cpp
parentd9f952948e7f17a13b6068818238e66cf9ff7e2b (diff)
downloadbcm5719-llvm-885e6382eb6aa3604cc931d11df78c9ec31b0740.tar.gz
bcm5719-llvm-885e6382eb6aa3604cc931d11df78c9ec31b0740.zip
Modifications to dyn_cast/cast to make them work for objects too, instead of only pointers.
The use case is if you have a wrapper class: class Base { void *Ptr; public: Base() : Ptr(0) { } operator bool() const { return Ptr; } ..... } and sub-wrappers that have exactly the same size: class Sub : public Base { public: .... static bool classof(const Base*); } and in the code you would do: void f(Base b) { Sub sub = dyn_cast<Sub>(b); if (sub) { .... } } llvm-svn: 78424
Diffstat (limited to 'llvm/utils/TableGen/AsmWriterEmitter.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud