summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2018-04-06 14:26:03 +0000
committerpatrick <patrick@openbsd.org>2018-04-06 14:26:03 +0000
commitbdabc2f19ffb9e20600dad6e8a300842a7bda50e (patch)
treec50e7b2e5449b074651bb82a58517a8ebc4a8cf7 /gnu/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
parentPrint a 'p' flag for file descriptors that were opened after pledge(2). (diff)
downloadwireguard-openbsd-bdabc2f19ffb9e20600dad6e8a300842a7bda50e.tar.xz
wireguard-openbsd-bdabc2f19ffb9e20600dad6e8a300842a7bda50e.zip
Import LLVM 6.0.1 release including clang, lld and lldb.
"where is the kaboom?" deraadt@
Diffstat (limited to 'gnu/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h')
-rw-r--r--gnu/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h46
1 files changed, 31 insertions, 15 deletions
diff --git a/gnu/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/gnu/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
index e3867279286..68482eb7e35 100644
--- a/gnu/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
+++ b/gnu/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
@@ -1,4 +1,4 @@
-//===-- llvm/CodeGen/DwarfCompileUnit.h - Dwarf Compile Unit ---*- C++ -*--===//
+//===- llvm/CodeGen/DwarfCompileUnit.h - Dwarf Compile Unit -----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -14,19 +14,32 @@
#ifndef LLVM_LIB_CODEGEN_ASMPRINTER_DWARFCOMPILEUNIT_H
#define LLVM_LIB_CODEGEN_ASMPRINTER_DWARFCOMPILEUNIT_H
+#include "DbgValueHistoryCalculator.h"
+#include "DwarfDebug.h"
#include "DwarfUnit.h"
+#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/StringMap.h"
+#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/Dwarf.h"
-#include "llvm/IR/DebugInfo.h"
+#include "llvm/CodeGen/DIE.h"
+#include "llvm/CodeGen/LexicalScopes.h"
+#include "llvm/IR/DebugInfoMetadata.h"
+#include "llvm/Support/Casting.h"
+#include <algorithm>
+#include <cassert>
+#include <cstdint>
+#include <memory>
namespace llvm {
-class StringRef;
class AsmPrinter;
-class DIE;
-class DwarfDebug;
class DwarfFile;
+class GlobalVariable;
+class MCExpr;
class MCSymbol;
-class LexicalScope;
+class MDNode;
class DwarfCompileUnit final : public DwarfUnit {
/// A numeric ID unique among all CUs in the module
@@ -37,7 +50,7 @@ class DwarfCompileUnit final : public DwarfUnit {
DIE::value_iterator StmtListValue;
/// Skeleton unit associated with this unit.
- DwarfCompileUnit *Skeleton;
+ DwarfCompileUnit *Skeleton = nullptr;
/// The start of the unit within its section.
MCSymbol *LabelBegin;
@@ -45,9 +58,8 @@ class DwarfCompileUnit final : public DwarfUnit {
/// The start of the unit macro info within macro section.
MCSymbol *MacroLabelBegin;
- typedef llvm::SmallVector<const MDNode *, 8> ImportedEntityList;
- typedef llvm::DenseMap<const MDNode *, ImportedEntityList>
- ImportedEntityMap;
+ using ImportedEntityList = SmallVector<const MDNode *, 8>;
+ using ImportedEntityMap = DenseMap<const MDNode *, ImportedEntityList>;
ImportedEntityMap ImportedEntities;
@@ -66,7 +78,7 @@ class DwarfCompileUnit final : public DwarfUnit {
// The base address of this unit, if any. Used for relative references in
// ranges/locs.
- const MCSymbol *BaseAddress;
+ const MCSymbol *BaseAddress = nullptr;
DenseMap<const MDNode *, DIE *> AbstractSPDies;
DenseMap<const MDNode *, std::unique_ptr<DbgVariable>> AbstractVariables;
@@ -164,6 +176,7 @@ public:
void attachRangesOrLowHighPC(DIE &D,
const SmallVectorImpl<InsnRange> &Ranges);
+
/// \brief This scope represents inlined body of a function. Construct
/// DIE to represent this concrete inlined copy of the function.
DIE *constructInlinedScopeDIE(LexicalScope *Scope);
@@ -181,7 +194,7 @@ public:
/// A helper function to create children of a Scope DIE.
DIE *createScopeChildrenDIE(LexicalScope *Scope,
SmallVectorImpl<DIE *> &Children,
- unsigned *ChildScopeCount = nullptr);
+ bool *HasNonScopeChildren = nullptr);
/// \brief Construct a DIE for this subprogram scope.
void constructSubprogramScopeDIE(const DISubprogram *Sub, LexicalScope *Scope);
@@ -195,8 +208,9 @@ public:
void finishSubprogramDefinition(const DISubprogram *SP);
void finishVariableDefinition(const DbgVariable &Var);
+
/// Find abstract variable associated with Var.
- typedef DbgValueHistoryMap::InlinedVariable InlinedVariable;
+ using InlinedVariable = DbgValueHistoryMap::InlinedVariable;
DbgVariable *getExistingAbstractVariable(InlinedVariable IV,
const DILocalVariable *&Cleansed);
DbgVariable *getExistingAbstractVariable(InlinedVariable IV);
@@ -275,8 +289,10 @@ public:
void setBaseAddress(const MCSymbol *Base) { BaseAddress = Base; }
const MCSymbol *getBaseAddress() const { return BaseAddress; }
+
+ bool hasDwarfPubSections() const;
};
-} // end llvm namespace
+} // end namespace llvm
-#endif
+#endif // LLVM_LIB_CODEGEN_ASMPRINTER_DWARFCOMPILEUNIT_H