[llvm] r233656 - DebugInfo: Move debug info flags to the new hierarchy
Duncan P. N. Exon Smith
dexonsmith at apple.com
Mon Mar 30 18:19:51 PDT 2015
Author: dexonsmith
Date: Mon Mar 30 20:19:51 2015
New Revision: 233656
URL: http://llvm.org/viewvc/llvm-project?rev=233656&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/IR/DebugInfo.h
llvm/trunk/include/llvm/IR/DebugInfoMetadata.h
Modified: llvm/trunk/include/llvm/IR/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfo.h?rev=233656&r1=233655&r2=233656&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/IR/DebugInfo.h Mon Mar 30 20:19:51 2015
@@ -127,14 +127,13 @@ class DIDescriptor {
template <typename T> 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);
Modified: llvm/trunk/include/llvm/IR/DebugInfoMetadata.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfoMetadata.h?rev=233656&r1=233655&r2=233656&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DebugInfoMetadata.h (original)
+++ llvm/trunk/include/llvm/IR/DebugInfoMetadata.h Mon Mar 30 20:19:51 2015
@@ -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:
More information about the llvm-commits
mailing list