Skip to content
Commit f86505ab authored by Duncan P. N. Exon Smith's avatar Duncan P. N. Exon Smith
Browse files

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
parent 301ed0c3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment