Fixup PPC Darwin i1 argument handling
[oota-llvm.git] / include / llvm / DebugInfo.h
index 4db4a356dfaec0b175a10919ca120ff5d435cd8d..d5d235c0a76c5de54e1e4adb3f4238d5ad32ec42 100644 (file)
@@ -427,6 +427,7 @@ public:
   DIArray getImportedEntities() const;
 
   StringRef getSplitDebugFilename() const { return getStringField(12); }
+  unsigned getEmissionKind() const { return getUnsignedField(13); }
 
   /// Verify - Verify that a compile unit is well formed.
   bool Verify() const;
@@ -521,6 +522,7 @@ public:
   DIScope getContext() const { return getFieldAs<DIScope>(2); }
   unsigned getLineNumber() const { return getUnsignedField(3); }
   unsigned getColumnNumber() const { return getUnsignedField(4); }
+  unsigned getDiscriminator() const { return getUnsignedField(5); }
   bool Verify() const;
 };
 
@@ -553,6 +555,13 @@ public:
   bool Verify() const;
 };
 
+/// DIUnspecifiedParameter - This is a wrapper for unspecified parameters.
+class DIUnspecifiedParameter : public DIDescriptor {
+public:
+  explicit DIUnspecifiedParameter(const MDNode *N = 0) : DIDescriptor(N) {}
+  bool Verify() const;
+};
+
 /// DITemplateTypeParameter - This is a wrapper for template type parameter.
 class DITemplateTypeParameter : public DIDescriptor {
 public:
@@ -692,6 +701,27 @@ public:
   StringRef getFilename() const { return getScope().getFilename(); }
   StringRef getDirectory() const { return getScope().getDirectory(); }
   bool Verify() const;
+  bool atSameLineAs(const DILocation &Other) const {
+    return (getLineNumber() == Other.getLineNumber() &&
+            getFilename() == Other.getFilename());
+  }
+  /// getDiscriminator - DWARF discriminators are used to distinguish
+  /// identical file locations for instructions that are on different
+  /// basic blocks. If two instructions are inside the same lexical block
+  /// and are in different basic blocks, we create a new lexical block
+  /// with identical location as the original but with a different
+  /// discriminator value (lib/Transforms/Util/AddDiscriminators.cpp
+  /// for details).
+  unsigned getDiscriminator() const {
+    // Since discriminators are associated with lexical blocks, make
+    // sure this location is a lexical block before retrieving its
+    // value.
+    return getScope().isLexicalBlock()
+               ? getFieldAs<DILexicalBlock>(2).getDiscriminator()
+               : 0;
+  }
+  unsigned computeNewDiscriminator(LLVMContext &Ctx);
+  DILocation copyWithNewScope(LLVMContext &Ctx, DILexicalBlock NewScope);
 };
 
 class DIObjCProperty : public DIDescriptor {