DebugInfo: Move debug info flags to the new hierarchy

Move definition of the debug info flags to the new hierarchy, but leave
them duplicated in `DIDescriptor` for now to reduce code churn.  My
current plan is to remove `DIDescriptor` entirely, so the duplication
should go away naturally.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233656 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-03-31 01:19:51 +00:00
parent 2f5cbb5947
commit 0cbd7fc433
2 changed files with 14 additions and 5 deletions

View File

@@ -127,14 +127,13 @@ class DIDescriptor {
template <typename T> friend class DIRef; template <typename T> friend class DIRef;
public: public:
/// \brief Accessibility flags. /// \brief Duplicated debug info flags.
/// ///
/// The three accessibility flags are mutually exclusive and rolled together /// \see DebugNode::DIFlags.
/// in the first two bits.
enum { enum {
#define HANDLE_DI_FLAG(ID, NAME) Flag##NAME = ID, #define HANDLE_DI_FLAG(ID, NAME) Flag##NAME = DebugNode::Flag##NAME,
#include "llvm/IR/DebugInfoFlags.def" #include "llvm/IR/DebugInfoFlags.def"
FlagAccessibility = FlagPrivate | FlagProtected | FlagPublic FlagAccessibility = DebugNode::FlagAccessibility
}; };
static unsigned getFlag(StringRef Flag); static unsigned getFlag(StringRef Flag);

View File

@@ -78,6 +78,16 @@ protected:
public: public:
unsigned getTag() const { return SubclassData16; } unsigned getTag() const { return SubclassData16; }
/// \brief Debug info flags.
///
/// The three accessibility flags are mutually exclusive and rolled together
/// in the first two bits.
enum DIFlags {
#define HANDLE_DI_FLAG(ID, NAME) Flag##NAME = ID,
#include "llvm/IR/DebugInfoFlags.def"
FlagAccessibility = FlagPrivate | FlagProtected | FlagPublic
};
static bool classof(const Metadata *MD) { static bool classof(const Metadata *MD) {
switch (MD->getMetadataID()) { switch (MD->getMetadataID()) {
default: default: