OSDN Git Service

DebugInfo: Add MDLocalScope, a legal scope for locals
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 24 Mar 2015 16:44:29 +0000 (16:44 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 24 Mar 2015 16:44:29 +0000 (16:44 +0000)
commitab10069039fe434ddfc0d4a900d1f862e8df0226
tree421dd567d47605ca3aeba043e89a7dac9b17cedf
parent63ccf1413942b5b509fbf59f952980994b89210a
DebugInfo: Add MDLocalScope, a legal scope for locals

Add a subclass of `MDScope` to explicitly categorize the legal scopes
for locals -- in particular, scopes that are legal for `MDLocation`,
`MDLexicalBlockBase`, and `MDLocalVariable`.  This provides a convenient
`isa<>` target for the verifier, and eventually I'll be changing the
above classes' `getScope()` to specifically return it.  Currently, its
subclasses are `MDSubprogram`, `MDLexicalBlock`, and
`MDLexicalBlockFile`.

I've gone with `MDLocalScope` for now -- a little ambiguous since it's a
scope *for* locals, not a scope that's local -- but I'm open to more
descriptive names if someone can think of something better.  Regardless,
the code docs should make it clear enough.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233092 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/DebugInfoMetadata.h
include/llvm/IR/Metadata.def