Fix a use-iterator-after-invalidate error
[oota-llvm.git] / include / llvm / IR / DebugInfo.h
index bf15d588be5f28a0930313089a31607fe2694ea1..d2e59752080a8f0342cbc75a224673660728691d 100644 (file)
@@ -137,6 +137,16 @@ public:
     FlagAccessibility = FlagPrivate | FlagProtected | FlagPublic
   };
 
+  static unsigned getFlag(StringRef Flag);
+  static const char *getFlagString(unsigned Flag);
+
+  /// \brief Split up a flags bitfield.
+  ///
+  /// Split \c Flags into \c SplitFlags, a vector of its components.  Returns
+  /// any remaining (unrecognized) bits.
+  static unsigned splitFlags(unsigned Flags,
+                             SmallVectorImpl<unsigned> &SplitFlags);
+
 protected:
   const MDNode *DbgNode;
 
@@ -1020,6 +1030,7 @@ class DIImportedEntity : public DIDescriptor {
   void printInternal(raw_ostream &OS) const;
 
 public:
+  DIImportedEntity() = default;
   explicit DIImportedEntity(const MDNode *N) : DIDescriptor(N) {}
   DIScope getContext() const { return getFieldAs<DIScope>(1); }
   DIDescriptorRef getEntity() const { return getFieldAs<DIDescriptorRef>(2); }