Commit Graph

9 Commits

Author SHA1 Message Date
Duncan P. N. Exon Smith
7473485c0f IR: Add MDExpression::ExprOperand
Port `DIExpression::Operand` over to `MDExpression::ExprOperand`.  The
logic is needed directly in `MDExpression` to support printing in
assembly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229002 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 01:07:46 +00:00
Duncan P. N. Exon Smith
3740ae4600 IR: Remove unnecessary fields from MDTemplateParameter
I noticed this fields were never used in r228607, but I neglected to
propagate that into `MDTemplateParameter` until now.  This really should
have been done before commit in r228640; sorry for the churn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228652 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 01:59:57 +00:00
Duncan P. N. Exon Smith
db7dea0e2e IR: Add accessors to MDExpression
Add some accessors to `MDExpression`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228648 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 01:36:46 +00:00
Duncan P. N. Exon Smith
14fcfef23b IR: Add specialized debug info metadata nodes
Add specialized debug info metadata nodes that match the `DIDescriptor`
wrappers (used by `DIBuilder`) closely.  Assembly and bitcode support to
follow soon (it'll mostly just be obvious), but this sketches in today's
schema.  This is the first big commit (well, the only *big* one aside
from the testcase changes that'll come when I move this into place) for
PR22464.

I've marked a bunch of obvious changes as `TODO`s in the source; I plan
to make those changes promptly after this hierarchy is moved underneath
`DIDescriptor`, but for now I'm aiming mostly to match the status quo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228640 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 00:52:32 +00:00
Duncan P. N. Exon Smith
c760eff69f IR: Split out getOperandAs(), NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228250 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-05 01:07:47 +00:00
Duncan P. N. Exon Smith
2a11d59014 IR: Allow GenericDebugNode construction from MDString
Allow `GenericDebugNode` construction directly from `MDString`, rather
than requiring `StringRef`s.  I've refactored the `StringRef`
constructors to use these.  There's no real functionality change here,
except for exposing the lower-level API.

The purpose of this is to simplify construction of string operands when
reading bitcode.  It's unnecessarily indirect to parse an `MDString` ID,
lookup the `MDString` in the bitcode reader list, get the `StringRef`
out of that, and then have `GenericDebugNode::getImpl()` use
`MDString::get()` to acquire the original `MDString`.  Instead, this
allows the bitcode reader to directly pass in the `MDString`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227848 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-02 20:01:03 +00:00
Duncan P. N. Exon Smith
21b88f5f90 IR: Extract DEFINE_MDNODE_GET(), NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227847 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-02 19:55:21 +00:00
Duncan P. N. Exon Smith
265dc3e4c9 IR: Separate helpers for string operands, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227846 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-02 19:54:05 +00:00
Duncan P. N. Exon Smith
ca8d3bf8af IR: Split out DebugInfoMetadata.h, NFC
Move debug-info-centred `Metadata` subclasses into their own
header/source file.  A couple of private template functions are needed
from both `Metadata.cpp` and `DebugInfoMetadata.cpp`, so I've moved them
to `lib/IR/MetadataImpl.h`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227835 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-02 18:53:21 +00:00