From 0cbd7fc4336eba6f9e58233ead34500d2d943a02 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Tue, 31 Mar 2015 01:19:51 +0000 Subject: [PATCH] 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 --- include/llvm/IR/DebugInfo.h | 9 ++++----- include/llvm/IR/DebugInfoMetadata.h | 10 ++++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/include/llvm/IR/DebugInfo.h b/include/llvm/IR/DebugInfo.h index c8c55d2d307..ec7c1a7a66e 100644 --- a/include/llvm/IR/DebugInfo.h +++ b/include/llvm/IR/DebugInfo.h @@ -127,14 +127,13 @@ class DIDescriptor { template friend class DIRef; public: - /// \brief Accessibility flags. + /// \brief Duplicated debug info flags. /// - /// The three accessibility flags are mutually exclusive and rolled together - /// in the first two bits. + /// \see DebugNode::DIFlags. 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" - FlagAccessibility = FlagPrivate | FlagProtected | FlagPublic + FlagAccessibility = DebugNode::FlagAccessibility }; static unsigned getFlag(StringRef Flag); diff --git a/include/llvm/IR/DebugInfoMetadata.h b/include/llvm/IR/DebugInfoMetadata.h index ce6e88496b6..f25358c2393 100644 --- a/include/llvm/IR/DebugInfoMetadata.h +++ b/include/llvm/IR/DebugInfoMetadata.h @@ -78,6 +78,16 @@ protected: public: 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) { switch (MD->getMetadataID()) { default: