diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-20 02:28:49 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-20 02:28:49 +0000 |
commit | f86505abdf501b257271e718742ee76b96ca969c (patch) | |
tree | c98516783948dea64e3c5b3db6cf84d9031ede80 /llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | |
parent | 301ed0c3b498e4f79c1dfbb677b6e0b54ba8dff0 (diff) | |
download | bcm5719-llvm-f86505abdf501b257271e718742ee76b96ca969c.tar.gz bcm5719-llvm-f86505abdf501b257271e718742ee76b96ca969c.zip |
IR: Extract macros from DILocation, NFC
`DILocation` is a lightweight wrapper. Its accessors check for null and
the correct type, and then forward to `MDLocation`.
Extract a couple of macros to do the `dyn_cast_or_null<>` and default
return logic. I'll be using these to minimize error-prone boilerplate
when I move the new hierarchy into place -- since all the other
subclasses of `DIDescriptor` will similarly become lightweight wrappers.
(Note that I hope to obsolete these wrappers fairly quickly, with the
goal of renaming the underlying types (e.g., I'll rename `MDLocation` to
`DILocation` once the name is free).)
llvm-svn: 229953
Diffstat (limited to 'llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp')
0 files changed, 0 insertions, 0 deletions