svn commit: r319250 - in projects/clang500-import: contrib/libc++/include contrib/libc++/include/experimental contrib/llvm/include/llvm/Analysis contrib/llvm/include/llvm/CodeGen contrib/llvm/inclu...
Dimitry Andric
dim at FreeBSD.org
Tue May 30 19:24:12 UTC 2017
Author: dim
Date: Tue May 30 19:24:09 2017
New Revision: 319250
URL: https://svnweb.freebsd.org/changeset/base/319250
Log:
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304222, and update
build glue.
Added:
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h
- copied unchanged from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h
- copied unchanged from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h
- copied unchanged from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h
- copied unchanged from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugStringTableSubsection.h
- copied unchanged from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugStringTableSubsection.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugSubsection.h
- copied unchanged from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsection.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugSubsectionRecord.h
- copied unchanged from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionRecord.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugSubsectionVisitor.h
- copied unchanged from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionVisitor.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugSymbolsSubsection.h
- copied unchanged from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSymbolsSubsection.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugUnknownSubsection.h
- copied unchanged from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugUnknownSubsection.h
projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp
- copied unchanged from r319241, vendor/llvm/dist/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp
projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/DebugFrameDataSubsection.cpp
- copied unchanged from r319241, vendor/llvm/dist/lib/DebugInfo/CodeView/DebugFrameDataSubsection.cpp
projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp
- copied unchanged from r319241, vendor/llvm/dist/lib/DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp
projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp
- copied unchanged from r319241, vendor/llvm/dist/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp
projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp
- copied unchanged from r319241, vendor/llvm/dist/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp
projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/DebugSubsection.cpp
- copied unchanged from r319241, vendor/llvm/dist/lib/DebugInfo/CodeView/DebugSubsection.cpp
projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/DebugSubsectionRecord.cpp
- copied unchanged from r319241, vendor/llvm/dist/lib/DebugInfo/CodeView/DebugSubsectionRecord.cpp
projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/DebugSubsectionVisitor.cpp
- copied unchanged from r319241, vendor/llvm/dist/lib/DebugInfo/CodeView/DebugSubsectionVisitor.cpp
projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/DebugSymbolsSubsection.cpp
- copied unchanged from r319241, vendor/llvm/dist/lib/DebugInfo/CodeView/DebugSymbolsSubsection.cpp
projects/clang500-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrDFP.td
- copied unchanged from r319241, vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrDFP.td
projects/clang500-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrHFP.td
- copied unchanged from r319241, vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrHFP.td
projects/clang500-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
- copied unchanged from r319242, vendor/clang/dist/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
Deleted:
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/ModuleDebugFragment.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/ModuleDebugFragmentRecord.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/ModuleDebugFragmentVisitor.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/ModuleDebugLineFragment.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/ModuleDebugUnknownFragment.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/StringTable.h
projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.cpp
projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/ModuleDebugFragment.cpp
projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/ModuleDebugFragmentRecord.cpp
projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/ModuleDebugFragmentVisitor.cpp
projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.cpp
projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/ModuleDebugLineFragment.cpp
projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/StringTable.cpp
projects/clang500-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp
projects/clang500-import/contrib/llvm/tools/llvm-readobj/CodeView.h
Modified:
projects/clang500-import/contrib/libc++/include/experimental/coroutine
projects/clang500-import/contrib/libc++/include/module.modulemap
projects/clang500-import/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h
projects/clang500-import/contrib/llvm/include/llvm/CodeGen/DIE.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/CodeView.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolVisitorDelegate.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/DbiStream.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/PDBStringTable.h
projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/PDBStringTableBuilder.h
projects/clang500-import/contrib/llvm/include/llvm/MC/ConstantPools.h
projects/clang500-import/contrib/llvm/include/llvm/Support/ManagedStatic.h
projects/clang500-import/contrib/llvm/include/llvm/TableGen/Record.h
projects/clang500-import/contrib/llvm/include/llvm/Transforms/Scalar/GVNExpression.h
projects/clang500-import/contrib/llvm/lib/Analysis/ScalarEvolution.cpp
projects/clang500-import/contrib/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
projects/clang500-import/contrib/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
projects/clang500-import/contrib/llvm/lib/CodeGen/GlobalISel/Localizer.cpp
projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
projects/clang500-import/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
projects/clang500-import/contrib/llvm/lib/CodeGen/TargetLoweringBase.cpp
projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/EnumTables.cpp
projects/clang500-import/contrib/llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp
projects/clang500-import/contrib/llvm/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp
projects/clang500-import/contrib/llvm/lib/MC/MCCodeView.cpp
projects/clang500-import/contrib/llvm/lib/Support/APFloat.cpp
projects/clang500-import/contrib/llvm/lib/Support/Timer.cpp
projects/clang500-import/contrib/llvm/lib/TableGen/Record.cpp
projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
projects/clang500-import/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
projects/clang500-import/contrib/llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp
projects/clang500-import/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp
projects/clang500-import/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
projects/clang500-import/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
projects/clang500-import/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp
projects/clang500-import/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td
projects/clang500-import/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.td
projects/clang500-import/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
projects/clang500-import/contrib/llvm/lib/Target/SystemZ/SystemZ.td
projects/clang500-import/contrib/llvm/lib/Target/SystemZ/SystemZFeatures.td
projects/clang500-import/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
projects/clang500-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrFP.td
projects/clang500-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrFormats.td
projects/clang500-import/contrib/llvm/lib/Target/SystemZ/SystemZScheduleZ13.td
projects/clang500-import/contrib/llvm/lib/Target/SystemZ/SystemZScheduleZ196.td
projects/clang500-import/contrib/llvm/lib/Target/SystemZ/SystemZScheduleZEC12.td
projects/clang500-import/contrib/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp
projects/clang500-import/contrib/llvm/lib/Target/SystemZ/SystemZSubtarget.h
projects/clang500-import/contrib/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
projects/clang500-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp
projects/clang500-import/contrib/llvm/lib/Transforms/Scalar/NewGVN.cpp
projects/clang500-import/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
projects/clang500-import/contrib/llvm/tools/clang/include/clang-c/Index.h
projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLexKinds.td
projects/clang500-import/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td
projects/clang500-import/contrib/llvm/tools/clang/include/clang/Frontend/ASTUnit.h
projects/clang500-import/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h
projects/clang500-import/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorLexer.h
projects/clang500-import/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorOptions.h
projects/clang500-import/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h
projects/clang500-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
projects/clang500-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
projects/clang500-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h
projects/clang500-import/contrib/llvm/tools/clang/lib/CodeGen/CGCoroutine.cpp
projects/clang500-import/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp
projects/clang500-import/contrib/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp
projects/clang500-import/contrib/llvm/tools/clang/lib/Headers/altivec.h
projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp
projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/PPDirectives.cpp
projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/PPLexerChange.cpp
projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/Pragma.cpp
projects/clang500-import/contrib/llvm/tools/clang/lib/Lex/Preprocessor.cpp
projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp
projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp
projects/clang500-import/contrib/llvm/tools/clang/lib/Sema/SemaOpenMP.cpp
projects/clang500-import/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp
projects/clang500-import/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp
projects/clang500-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
projects/clang500-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp
projects/clang500-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ProgramState.cpp
projects/clang500-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp
projects/clang500-import/contrib/llvm/tools/lld/ELF/LinkerScript.cpp
projects/clang500-import/contrib/llvm/tools/lld/ELF/LinkerScript.h
projects/clang500-import/contrib/llvm/tools/lld/ELF/MapFile.cpp
projects/clang500-import/contrib/llvm/tools/lld/ELF/MapFile.h
projects/clang500-import/contrib/llvm/tools/lld/ELF/OutputSections.cpp
projects/clang500-import/contrib/llvm/tools/lld/ELF/ScriptParser.cpp
projects/clang500-import/contrib/llvm/tools/lld/ELF/Writer.cpp
projects/clang500-import/contrib/llvm/tools/lldb/include/lldb/Utility/Log.h
projects/clang500-import/contrib/llvm/tools/llvm-pdbdump/C13DebugFragmentVisitor.cpp
projects/clang500-import/contrib/llvm/tools/llvm-pdbdump/C13DebugFragmentVisitor.h
projects/clang500-import/contrib/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp
projects/clang500-import/contrib/llvm/tools/llvm-pdbdump/YAMLOutputStyle.cpp
projects/clang500-import/contrib/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp
projects/clang500-import/contrib/llvm/tools/llvm-readobj/COFFDumper.cpp
projects/clang500-import/contrib/llvm/utils/TableGen/GlobalISelEmitter.cpp
projects/clang500-import/contrib/llvm/utils/TableGen/X86FoldTablesEmitter.cpp
projects/clang500-import/lib/clang/include/clang/Basic/Version.inc
projects/clang500-import/lib/clang/include/lld/Config/Version.inc
projects/clang500-import/lib/clang/include/llvm/Support/VCSRevision.h
projects/clang500-import/lib/clang/libclang/Makefile
projects/clang500-import/lib/clang/libllvm/Makefile
Directory Properties:
projects/clang500-import/contrib/compiler-rt/ (props changed)
projects/clang500-import/contrib/libc++/ (props changed)
projects/clang500-import/contrib/llvm/ (props changed)
projects/clang500-import/contrib/llvm/tools/clang/ (props changed)
projects/clang500-import/contrib/llvm/tools/lld/ (props changed)
projects/clang500-import/contrib/llvm/tools/lldb/ (props changed)
Modified: projects/clang500-import/contrib/libc++/include/experimental/coroutine
==============================================================================
--- projects/clang500-import/contrib/libc++/include/experimental/coroutine Tue May 30 18:08:33 2017 (r319249)
+++ projects/clang500-import/contrib/libc++/include/experimental/coroutine Tue May 30 19:24:09 2017 (r319250)
@@ -145,6 +145,19 @@ class _LIBCPP_TEMPLATE_VIS coroutine_handle<void> { (p
return __tmp;
}
+ // FIXME: Should from_address(nullptr) be allowed?
+ _LIBCPP_ALWAYS_INLINE
+ static coroutine_handle from_address(nullptr_t) _NOEXCEPT {
+ return coroutine_handle(nullptr);
+ }
+
+ template <class _Tp, bool _CallIsValid = false>
+ static coroutine_handle from_address(_Tp*) {
+ static_assert(_CallIsValid,
+ "coroutine_handle<void>::from_address cannot be called with "
+ "non-void pointers");
+ }
+
private:
bool __is_suspended() const _NOEXCEPT {
// FIXME actually implement a check for if the coro is suspended.
@@ -218,11 +231,22 @@ class _LIBCPP_TEMPLATE_VIS coroutine_handle : public c
// FIXME: should from_address work with nullptr?
_LIBCPP_ALWAYS_INLINE
static coroutine_handle from_address(nullptr_t) _NOEXCEPT {
- return {};
+ return coroutine_handle(nullptr);
}
- // from_address cannot be used with the coroutines promise type.
- static coroutine_handle from_address(_Promise*) = delete;
+ template <class _Tp, bool _CallIsValid = false>
+ static coroutine_handle from_address(_Tp*) {
+ static_assert(_CallIsValid,
+ "coroutine_handle<promise_type>::from_address cannot be called with "
+ "non-void pointers");
+ }
+
+ template <bool _CallIsValid = false>
+ static coroutine_handle from_address(_Promise*) {
+ static_assert(_CallIsValid,
+ "coroutine_handle<promise_type>::from_address cannot be used with "
+ "pointers to the coroutine's promise type; use 'from_promise' instead");
+ }
_LIBCPP_ALWAYS_INLINE
static coroutine_handle from_promise(_Promise& __promise) _NOEXCEPT {
Modified: projects/clang500-import/contrib/libc++/include/module.modulemap
==============================================================================
--- projects/clang500-import/contrib/libc++/include/module.modulemap Tue May 30 18:08:33 2017 (r319249)
+++ projects/clang500-import/contrib/libc++/include/module.modulemap Tue May 30 19:24:09 2017 (r319250)
@@ -502,6 +502,7 @@ module std [system] {
export *
}
module coroutine {
+ requires coroutines
header "experimental/coroutine"
export *
}
Modified: projects/clang500-import/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h Tue May 30 18:08:33 2017 (r319249)
+++ projects/clang500-import/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h Tue May 30 19:24:09 2017 (r319250)
@@ -1536,8 +1536,7 @@ class ScalarEvolution { (public)
/// Determine if the SCEV can be evaluated at loop's entry. It is true if it
/// doesn't depend on a SCEVUnknown of an instruction which is dominated by
/// the header of loop L.
- bool isAvailableAtLoopEntry(const SCEV *S, const Loop *L, DominatorTree &DT,
- LoopInfo &LI);
+ bool isAvailableAtLoopEntry(const SCEV *S, const Loop *L);
/// Return true if the given SCEV changes value in a known way in the
/// specified loop. This property being true implies that the value is
Modified: projects/clang500-import/contrib/llvm/include/llvm/CodeGen/DIE.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm/CodeGen/DIE.h Tue May 30 18:08:33 2017 (r319249)
+++ projects/clang500-import/contrib/llvm/include/llvm/CodeGen/DIE.h Tue May 30 19:24:09 2017 (r319250)
@@ -383,11 +383,11 @@ class DIEValue { (private)
return;
#define HANDLE_DIEVALUE_SMALL(T) \
case is##T: \
- destruct<DIE##T>();
+ destruct<DIE##T>(); \
return;
#define HANDLE_DIEVALUE_LARGE(T) \
case is##T: \
- destruct<const DIE##T *>();
+ destruct<const DIE##T *>(); \
return;
#include "llvm/CodeGen/DIEValue.def"
}
Modified: projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/CodeView.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/CodeView.h Tue May 30 18:08:33 2017 (r319249)
+++ projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/CodeView.h Tue May 30 19:24:09 2017 (r319250)
@@ -13,6 +13,8 @@
#include <cinttypes>
#include <type_traits>
+#include "llvm/Support/Endian.h"
+
namespace llvm {
namespace codeview {
@@ -291,7 +293,7 @@ enum class ModifierOptions : uint16_t {
};
CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(ModifierOptions)
-enum class ModuleDebugFragmentKind : uint32_t {
+enum class DebugSubsectionKind : uint32_t {
None = 0,
Symbols = 0xf1,
Lines = 0xf2,
@@ -549,6 +551,24 @@ enum class FileChecksumKind : uint8_t { None, MD5, SHA
enum LineFlags : uint16_t {
LF_None = 0,
LF_HaveColumns = 1, // CV_LINES_HAVE_COLUMNS
+};
+
+/// Data in the the SUBSEC_FRAMEDATA subection.
+struct FrameData {
+ support::ulittle32_t RvaStart;
+ support::ulittle32_t CodeSize;
+ support::ulittle32_t LocalSize;
+ support::ulittle32_t ParamsSize;
+ support::ulittle32_t MaxStackSize;
+ support::ulittle32_t FrameFunc;
+ support::ulittle16_t PrologSize;
+ support::ulittle16_t SavedRegsSize;
+ support::ulittle32_t Flags;
+ enum : uint32_t {
+ HasSEH = 1 << 0,
+ HasEH = 1 << 1,
+ IsFunctionStart = 1 << 2,
+ };
};
}
}
Copied: projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h (from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h Tue May 30 19:24:09 2017 (r319250, copy of r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h)
@@ -0,0 +1,98 @@
+//===- DebugChecksumsSubsection.h -------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_CODEVIEW_DEBUGCHECKSUMSSUBSECTION_H
+#define LLVM_DEBUGINFO_CODEVIEW_DEBUGCHECKSUMSSUBSECTION_H
+
+#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/DebugInfo/CodeView/DebugSubsection.h"
+#include "llvm/Support/Allocator.h"
+#include "llvm/Support/BinaryStreamArray.h"
+#include "llvm/Support/BinaryStreamReader.h"
+#include "llvm/Support/Endian.h"
+
+namespace llvm {
+namespace codeview {
+
+class DebugStringTableSubsection;
+
+struct FileChecksumEntry {
+ uint32_t FileNameOffset; // Byte offset of filename in global stringtable.
+ FileChecksumKind Kind; // The type of checksum.
+ ArrayRef<uint8_t> Checksum; // The bytes of the checksum.
+};
+}
+}
+
+namespace llvm {
+template <> struct VarStreamArrayExtractor<codeview::FileChecksumEntry> {
+public:
+ typedef void ContextType;
+
+ static Error extract(BinaryStreamRef Stream, uint32_t &Len,
+ codeview::FileChecksumEntry &Item);
+};
+}
+
+namespace llvm {
+namespace codeview {
+class DebugChecksumsSubsectionRef final : public DebugSubsectionRef {
+ typedef VarStreamArray<codeview::FileChecksumEntry> FileChecksumArray;
+ typedef FileChecksumArray::Iterator Iterator;
+
+public:
+ DebugChecksumsSubsectionRef()
+ : DebugSubsectionRef(DebugSubsectionKind::FileChecksums) {}
+
+ static bool classof(const DebugSubsectionRef *S) {
+ return S->kind() == DebugSubsectionKind::FileChecksums;
+ }
+
+ bool valid() const { return Checksums.valid(); }
+
+ Error initialize(BinaryStreamReader Reader);
+ Error initialize(BinaryStreamRef Stream);
+
+ Iterator begin() { return Checksums.begin(); }
+ Iterator end() { return Checksums.end(); }
+
+ const FileChecksumArray &getArray() const { return Checksums; }
+
+private:
+ FileChecksumArray Checksums;
+};
+
+class DebugChecksumsSubsection final : public DebugSubsection {
+public:
+ explicit DebugChecksumsSubsection(DebugStringTableSubsection &Strings);
+
+ static bool classof(const DebugSubsection *S) {
+ return S->kind() == DebugSubsectionKind::FileChecksums;
+ }
+
+ void addChecksum(StringRef FileName, FileChecksumKind Kind,
+ ArrayRef<uint8_t> Bytes);
+
+ uint32_t calculateSerializedSize() const override;
+ Error commit(BinaryStreamWriter &Writer) const override;
+ uint32_t mapChecksumOffset(StringRef FileName) const;
+
+private:
+ DebugStringTableSubsection &Strings;
+
+ DenseMap<uint32_t, uint32_t> OffsetMap;
+ uint32_t SerializedSize = 0;
+ llvm::BumpPtrAllocator Storage;
+ std::vector<FileChecksumEntry> Checksums;
+};
+}
+}
+
+#endif
Copied: projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h (from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h Tue May 30 19:24:09 2017 (r319250, copy of r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h)
@@ -0,0 +1,59 @@
+//===- DebugFrameDataSubsection.h ------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_CODEVIEW_DEBUGFRAMEDATASUBSECTION_H
+#define LLVM_DEBUGINFO_CODEVIEW_DEBUGFRAMEDATASUBSECTION_H
+
+#include "llvm/DebugInfo/CodeView/CodeView.h"
+#include "llvm/DebugInfo/CodeView/DebugSubsection.h"
+#include "llvm/Support/BinaryStreamReader.h"
+#include "llvm/Support/Error.h"
+
+namespace llvm {
+namespace codeview {
+class DebugFrameDataSubsectionRef final : public DebugSubsectionRef {
+public:
+ DebugFrameDataSubsectionRef()
+ : DebugSubsectionRef(DebugSubsectionKind::FrameData) {}
+ static bool classof(const DebugSubsection *S) {
+ return S->kind() == DebugSubsectionKind::FrameData;
+ }
+
+ Error initialize(BinaryStreamReader Reader);
+
+ FixedStreamArray<FrameData>::Iterator begin() const { return Frames.begin(); }
+ FixedStreamArray<FrameData>::Iterator end() const { return Frames.end(); }
+
+ const void *getRelocPtr() const { return RelocPtr; }
+
+private:
+ const uint32_t *RelocPtr = nullptr;
+ FixedStreamArray<FrameData> Frames;
+};
+
+class DebugFrameDataSubsection final : public DebugSubsection {
+public:
+ DebugFrameDataSubsection()
+ : DebugSubsection(DebugSubsectionKind::FrameData) {}
+ static bool classof(const DebugSubsection *S) {
+ return S->kind() == DebugSubsectionKind::FrameData;
+ }
+
+ uint32_t calculateSerializedSize() const override;
+ Error commit(BinaryStreamWriter &Writer) const override;
+
+ void addFrameData(const FrameData &Frame);
+
+private:
+ std::vector<FrameData> Frames;
+};
+}
+}
+
+#endif
Copied: projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h (from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h Tue May 30 19:24:09 2017 (r319250, copy of r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h)
@@ -0,0 +1,105 @@
+//===- DebugInlineeLinesSubsection.h ----------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_CODEVIEW_BUGINLINEELINESSUBSECTION_H
+#define LLVM_DEBUGINFO_CODEVIEW_BUGINLINEELINESSUBSECTION_H
+
+#include "llvm/DebugInfo/CodeView/DebugSubsection.h"
+#include "llvm/DebugInfo/CodeView/Line.h"
+#include "llvm/Support/BinaryStreamArray.h"
+#include "llvm/Support/BinaryStreamReader.h"
+#include "llvm/Support/Error.h"
+
+namespace llvm {
+namespace codeview {
+
+class DebugInlineeLinesSubsectionsRef;
+class DebugChecksumsSubsection;
+
+enum class InlineeLinesSignature : uint32_t {
+ Normal, // CV_INLINEE_SOURCE_LINE_SIGNATURE
+ ExtraFiles // CV_INLINEE_SOURCE_LINE_SIGNATURE_EX
+};
+
+struct InlineeSourceLineHeader {
+ TypeIndex Inlinee; // ID of the function that was inlined.
+ support::ulittle32_t FileID; // Offset into FileChecksums subsection.
+ support::ulittle32_t SourceLineNum; // First line of inlined code.
+ // If extra files present:
+ // ulittle32_t ExtraFileCount;
+ // ulittle32_t Files[];
+};
+
+struct InlineeSourceLine {
+ const InlineeSourceLineHeader *Header;
+ FixedStreamArray<support::ulittle32_t> ExtraFiles;
+};
+}
+
+template <> struct VarStreamArrayExtractor<codeview::InlineeSourceLine> {
+ typedef bool ContextType;
+
+ static Error extract(BinaryStreamRef Stream, uint32_t &Len,
+ codeview::InlineeSourceLine &Item, bool HasExtraFiles);
+};
+
+namespace codeview {
+class DebugInlineeLinesSubsectionRef final : public DebugSubsectionRef {
+ typedef VarStreamArray<InlineeSourceLine> LinesArray;
+ typedef LinesArray::Iterator Iterator;
+
+public:
+ DebugInlineeLinesSubsectionRef();
+
+ static bool classof(const DebugSubsectionRef *S) {
+ return S->kind() == DebugSubsectionKind::InlineeLines;
+ }
+
+ Error initialize(BinaryStreamReader Reader);
+ bool hasExtraFiles() const;
+
+ Iterator begin() const { return Lines.begin(); }
+ Iterator end() const { return Lines.end(); }
+
+private:
+ InlineeLinesSignature Signature;
+ VarStreamArray<InlineeSourceLine> Lines;
+};
+
+class DebugInlineeLinesSubsection final : public DebugSubsection {
+public:
+ DebugInlineeLinesSubsection(DebugChecksumsSubsection &Checksums,
+ bool HasExtraFiles);
+
+ static bool classof(const DebugSubsection *S) {
+ return S->kind() == DebugSubsectionKind::InlineeLines;
+ }
+
+ Error commit(BinaryStreamWriter &Writer) const override;
+ uint32_t calculateSerializedSize() const override;
+
+ void addInlineSite(TypeIndex FuncId, StringRef FileName, uint32_t SourceLine);
+ void addExtraFile(StringRef FileName);
+
+private:
+ DebugChecksumsSubsection &Checksums;
+
+ bool HasExtraFiles = false;
+ uint32_t ExtraFileCount = 0;
+
+ struct Entry {
+ std::vector<support::ulittle32_t> ExtraFiles;
+ InlineeSourceLineHeader Header;
+ };
+ std::vector<Entry> Entries;
+};
+}
+}
+
+#endif
Copied: projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h (from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h Tue May 30 19:24:09 2017 (r319250, copy of r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h)
@@ -0,0 +1,143 @@
+//===- DebugLinesSubsection.h --------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGLINEFRAGMENT_H
+#define LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGLINEFRAGMENT_H
+
+#include "llvm/DebugInfo/CodeView/DebugSubsection.h"
+#include "llvm/DebugInfo/CodeView/Line.h"
+#include "llvm/Support/BinaryStreamArray.h"
+#include "llvm/Support/BinaryStreamReader.h"
+#include "llvm/Support/Error.h"
+
+namespace llvm {
+namespace codeview {
+
+class DebugChecksumsSubsection;
+class DebugStringTableSubsection;
+
+// Corresponds to the `CV_DebugSLinesHeader_t` structure.
+struct LineFragmentHeader {
+ support::ulittle32_t RelocOffset; // Code offset of line contribution.
+ support::ulittle16_t RelocSegment; // Code segment of line contribution.
+ support::ulittle16_t Flags; // See LineFlags enumeration.
+ support::ulittle32_t CodeSize; // Code size of this line contribution.
+};
+
+// Corresponds to the `CV_DebugSLinesFileBlockHeader_t` structure.
+struct LineBlockFragmentHeader {
+ support::ulittle32_t NameIndex; // Offset of FileChecksum entry in File
+ // checksums buffer. The checksum entry then
+ // contains another offset into the string
+ // table of the actual name.
+ support::ulittle32_t NumLines; // Number of lines
+ support::ulittle32_t BlockSize; // Code size of block, in bytes.
+ // The following two variable length arrays appear immediately after the
+ // header. The structure definitions follow.
+ // LineNumberEntry Lines[NumLines];
+ // ColumnNumberEntry Columns[NumLines];
+};
+
+// Corresponds to `CV_Line_t` structure
+struct LineNumberEntry {
+ support::ulittle32_t Offset; // Offset to start of code bytes for line number
+ support::ulittle32_t Flags; // Start:24, End:7, IsStatement:1
+};
+
+// Corresponds to `CV_Column_t` structure
+struct ColumnNumberEntry {
+ support::ulittle16_t StartColumn;
+ support::ulittle16_t EndColumn;
+};
+
+struct LineColumnEntry {
+ support::ulittle32_t NameIndex;
+ FixedStreamArray<LineNumberEntry> LineNumbers;
+ FixedStreamArray<ColumnNumberEntry> Columns;
+};
+
+class LineColumnExtractor {
+public:
+ typedef const LineFragmentHeader *ContextType;
+
+ static Error extract(BinaryStreamRef Stream, uint32_t &Len,
+ LineColumnEntry &Item, const LineFragmentHeader *Ctx);
+};
+
+class DebugLinesSubsectionRef final : public DebugSubsectionRef {
+ friend class LineColumnExtractor;
+ typedef VarStreamArray<LineColumnEntry, LineColumnExtractor> LineInfoArray;
+ typedef LineInfoArray::Iterator Iterator;
+
+public:
+ DebugLinesSubsectionRef();
+
+ static bool classof(const DebugSubsectionRef *S) {
+ return S->kind() == DebugSubsectionKind::Lines;
+ }
+
+ Error initialize(BinaryStreamReader Reader);
+
+ Iterator begin() const { return LinesAndColumns.begin(); }
+ Iterator end() const { return LinesAndColumns.end(); }
+
+ const LineFragmentHeader *header() const { return Header; }
+
+ bool hasColumnInfo() const;
+
+private:
+ const LineFragmentHeader *Header = nullptr;
+ LineInfoArray LinesAndColumns;
+};
+
+class DebugLinesSubsection final : public DebugSubsection {
+ struct Block {
+ Block(uint32_t ChecksumBufferOffset)
+ : ChecksumBufferOffset(ChecksumBufferOffset) {}
+
+ uint32_t ChecksumBufferOffset;
+ std::vector<LineNumberEntry> Lines;
+ std::vector<ColumnNumberEntry> Columns;
+ };
+
+public:
+ DebugLinesSubsection(DebugChecksumsSubsection &Checksums,
+ DebugStringTableSubsection &Strings);
+
+ static bool classof(const DebugSubsection *S) {
+ return S->kind() == DebugSubsectionKind::Lines;
+ }
+
+ void createBlock(StringRef FileName);
+ void addLineInfo(uint32_t Offset, const LineInfo &Line);
+ void addLineAndColumnInfo(uint32_t Offset, const LineInfo &Line,
+ uint32_t ColStart, uint32_t ColEnd);
+
+ uint32_t calculateSerializedSize() const override;
+ Error commit(BinaryStreamWriter &Writer) const override;
+
+ void setRelocationAddress(uint16_t Segment, uint16_t Offset);
+ void setCodeSize(uint32_t Size);
+ void setFlags(LineFlags Flags);
+
+ bool hasColumnInfo() const;
+
+private:
+ DebugChecksumsSubsection &Checksums;
+
+ uint16_t RelocOffset = 0;
+ uint16_t RelocSegment = 0;
+ uint32_t CodeSize = 0;
+ LineFlags Flags = LF_None;
+ std::vector<Block> Blocks;
+};
+}
+}
+
+#endif
Copied: projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugStringTableSubsection.h (from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugStringTableSubsection.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugStringTableSubsection.h Tue May 30 19:24:09 2017 (r319250, copy of r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugStringTableSubsection.h)
@@ -0,0 +1,86 @@
+//===- DebugStringTableSubsection.h - CodeView String Table -----*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_CODEVIEW_DEBUGSTRINGTABLESUBSECTION_H
+#define LLVM_DEBUGINFO_CODEVIEW_DEBUGSTRINGTABLESUBSECTION_H
+
+#include "llvm/ADT/StringMap.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/DebugInfo/CodeView/DebugSubsection.h"
+#include "llvm/Support/BinaryStreamRef.h"
+#include "llvm/Support/Error.h"
+
+#include <stdint.h>
+
+namespace llvm {
+
+class BinaryStreamReader;
+class BinaryStreamRef;
+class BinaryStreamWriter;
+
+namespace codeview {
+
+/// Represents a read-only view of a CodeView string table. This is a very
+/// simple flat buffer consisting of null-terminated strings, where strings
+/// are retrieved by their offset in the buffer. DebugStringTableSubsectionRef
+/// does not own the underlying storage for the buffer.
+class DebugStringTableSubsectionRef : public DebugSubsectionRef {
+public:
+ DebugStringTableSubsectionRef();
+
+ static bool classof(const DebugSubsectionRef *S) {
+ return S->kind() == DebugSubsectionKind::StringTable;
+ }
+
+ Error initialize(BinaryStreamRef Contents);
+
+ Expected<StringRef> getString(uint32_t Offset) const;
+
+ bool valid() const { return Stream.valid(); }
+
+private:
+ BinaryStreamRef Stream;
+};
+
+/// Represents a read-write view of a CodeView string table.
+/// DebugStringTableSubsection owns the underlying storage for the table, and is
+/// capable of serializing the string table into a format understood by
+/// DebugStringTableSubsectionRef.
+class DebugStringTableSubsection : public DebugSubsection {
+public:
+ DebugStringTableSubsection();
+
+ static bool classof(const DebugSubsection *S) {
+ return S->kind() == DebugSubsectionKind::StringTable;
+ }
+
+ // If string S does not exist in the string table, insert it.
+ // Returns the ID for S.
+ uint32_t insert(StringRef S);
+
+ // Return the ID for string S. Assumes S exists in the table.
+ uint32_t getStringId(StringRef S) const;
+
+ uint32_t calculateSerializedSize() const override;
+ Error commit(BinaryStreamWriter &Writer) const override;
+
+ uint32_t size() const;
+
+ StringMap<uint32_t>::const_iterator begin() const { return Strings.begin(); }
+
+ StringMap<uint32_t>::const_iterator end() const { return Strings.end(); }
+
+private:
+ StringMap<uint32_t> Strings;
+ uint32_t StringSize = 1;
+};
+}
+}
+
+#endif
Copied: projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugSubsection.h (from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsection.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugSubsection.h Tue May 30 19:24:09 2017 (r319250, copy of r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsection.h)
@@ -0,0 +1,52 @@
+//===- DebugSubsection.h ------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENT_H
+#define LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENT_H
+
+#include "llvm/DebugInfo/CodeView/CodeView.h"
+#include "llvm/Support/BinaryStreamWriter.h"
+#include "llvm/Support/Casting.h"
+
+namespace llvm {
+namespace codeview {
+
+class DebugSubsectionRef {
+public:
+ explicit DebugSubsectionRef(DebugSubsectionKind Kind) : Kind(Kind) {}
+ virtual ~DebugSubsectionRef();
+
+ static bool classof(const DebugSubsectionRef *S) { return true; }
+
+ DebugSubsectionKind kind() const { return Kind; }
+
+protected:
+ DebugSubsectionKind Kind;
+};
+
+class DebugSubsection {
+public:
+ explicit DebugSubsection(DebugSubsectionKind Kind) : Kind(Kind) {}
+ virtual ~DebugSubsection();
+
+ static bool classof(const DebugSubsection *S) { return true; }
+
+ DebugSubsectionKind kind() const { return Kind; }
+
+ virtual Error commit(BinaryStreamWriter &Writer) const = 0;
+ virtual uint32_t calculateSerializedSize() const = 0;
+
+protected:
+ DebugSubsectionKind Kind;
+};
+
+} // namespace codeview
+} // namespace llvm
+
+#endif // LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENT_H
Copied: projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugSubsectionRecord.h (from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionRecord.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugSubsectionRecord.h Tue May 30 19:24:09 2017 (r319250, copy of r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionRecord.h)
@@ -0,0 +1,77 @@
+//===- DebugSubsection.h ------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENTRECORD_H
+#define LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENTRECORD_H
+
+#include "llvm/DebugInfo/CodeView/CodeView.h"
+#include "llvm/Support/BinaryStreamArray.h"
+#include "llvm/Support/BinaryStreamRef.h"
+#include "llvm/Support/BinaryStreamWriter.h"
+#include "llvm/Support/Endian.h"
+#include "llvm/Support/Error.h"
+
+namespace llvm {
+namespace codeview {
+
+class DebugSubsection;
+
+// Corresponds to the `CV_DebugSSubsectionHeader_t` structure.
+struct DebugSubsectionHeader {
+ support::ulittle32_t Kind; // codeview::DebugSubsectionKind enum
+ support::ulittle32_t Length; // number of bytes occupied by this record.
+};
+
+class DebugSubsectionRecord {
+public:
+ DebugSubsectionRecord();
+ DebugSubsectionRecord(DebugSubsectionKind Kind, BinaryStreamRef Data);
+
+ static Error initialize(BinaryStreamRef Stream, DebugSubsectionRecord &Info);
+
+ uint32_t getRecordLength() const;
+ DebugSubsectionKind kind() const;
+ BinaryStreamRef getRecordData() const;
+
+private:
+ DebugSubsectionKind Kind;
+ BinaryStreamRef Data;
+};
+
+class DebugSubsectionRecordBuilder {
+public:
+ DebugSubsectionRecordBuilder(DebugSubsectionKind Kind, DebugSubsection &Frag);
+ uint32_t calculateSerializedLength();
+ Error commit(BinaryStreamWriter &Writer);
+
+private:
+ DebugSubsectionKind Kind;
+ DebugSubsection &Frag;
+};
+
+} // namespace codeview
+
+template <> struct VarStreamArrayExtractor<codeview::DebugSubsectionRecord> {
+ typedef void ContextType;
+
+ static Error extract(BinaryStreamRef Stream, uint32_t &Length,
+ codeview::DebugSubsectionRecord &Info) {
+ if (auto EC = codeview::DebugSubsectionRecord::initialize(Stream, Info))
+ return EC;
+ Length = Info.getRecordLength();
+ return Error::success();
+ }
+};
+
+namespace codeview {
+typedef VarStreamArray<DebugSubsectionRecord> DebugSubsectionArray;
+}
+} // namespace llvm
+
+#endif // LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENTRECORD_H
Copied: projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugSubsectionVisitor.h (from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionVisitor.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugSubsectionVisitor.h Tue May 30 19:24:09 2017 (r319250, copy of r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionVisitor.h)
@@ -0,0 +1,66 @@
+//===- DebugSubsectionVisitor.h -----------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENTVISITOR_H
+#define LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENTVISITOR_H
+
+#include "llvm/Support/Error.h"
+#include <cstdint>
+
+namespace llvm {
+
+namespace codeview {
+
+class DebugChecksumsSubsectionRef;
+class DebugSubsectionRecord;
+class DebugInlineeLinesSubsectionRef;
+class DebugLinesSubsectionRef;
+class DebugUnknownSubsectionRef;
+
+class DebugSubsectionVisitor {
+public:
+ virtual ~DebugSubsectionVisitor() = default;
+
+ virtual Error visitUnknown(DebugUnknownSubsectionRef &Unknown) {
+ return Error::success();
+ }
+ virtual Error visitLines(DebugLinesSubsectionRef &Lines) {
+ return Error::success();
+ }
+
+ virtual Error visitFileChecksums(DebugChecksumsSubsectionRef &Checksums) {
+ return Error::success();
+ }
+
+ virtual Error visitInlineeLines(DebugInlineeLinesSubsectionRef &Inlinees) {
+ return Error::success();
+ }
+
+ virtual Error finished() { return Error::success(); }
+};
+
+Error visitDebugSubsection(const DebugSubsectionRecord &R,
+ DebugSubsectionVisitor &V);
+
+template <typename T>
+Error visitDebugSubsections(T &&FragmentRange, DebugSubsectionVisitor &V) {
+ for (const auto &L : FragmentRange) {
+ if (auto EC = visitDebugSubsection(L, V))
+ return EC;
+ }
+ if (auto EC = V.finished())
+ return EC;
+ return Error::success();
+}
+
+} // end namespace codeview
+
+} // end namespace llvm
+
+#endif // LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENTVISITOR_H
Copied: projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugSymbolsSubsection.h (from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSymbolsSubsection.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugSymbolsSubsection.h Tue May 30 19:24:09 2017 (r319250, copy of r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSymbolsSubsection.h)
@@ -0,0 +1,53 @@
+//===- DebugSymbolsSubsection.h --------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_CODEVIEW_DEBUGSYMBOLSSUBSECTION_H
+#define LLVM_DEBUGINFO_CODEVIEW_DEBUGSYMBOLSSUBSECTION_H
+
+#include "llvm/DebugInfo/CodeView/DebugSubsection.h"
+#include "llvm/DebugInfo/CodeView/SymbolRecord.h"
+#include "llvm/Support/Error.h"
+
+namespace llvm {
+namespace codeview {
+class DebugSymbolsSubsectionRef final : public DebugSubsectionRef {
+public:
+ DebugSymbolsSubsectionRef()
+ : DebugSubsectionRef(DebugSubsectionKind::Symbols) {}
+
+ static bool classof(const DebugSubsectionRef *S) {
+ return S->kind() == DebugSubsectionKind::Symbols;
+ }
+
+ Error initialize(BinaryStreamReader Reader);
+
+private:
+ CVSymbolArray Records;
+};
+
+class DebugSymbolsSubsection final : public DebugSubsection {
+public:
+ DebugSymbolsSubsection() : DebugSubsection(DebugSubsectionKind::Symbols) {}
+ static bool classof(const DebugSubsection *S) {
+ return S->kind() == DebugSubsectionKind::Symbols;
+ }
+
+ uint32_t calculateSerializedSize() const override;
+ Error commit(BinaryStreamWriter &Writer) const override;
+
+ void addSymbol(CVSymbol Symbol);
+
+private:
+ uint32_t Length = 0;
+ std::vector<CVSymbol> Records;
+};
+}
+}
+
+#endif
Copied: projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugUnknownSubsection.h (from r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugUnknownSubsection.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugUnknownSubsection.h Tue May 30 19:24:09 2017 (r319250, copy of r319241, vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugUnknownSubsection.h)
@@ -0,0 +1,32 @@
+//===- DebugUnknownSubsection.h -----------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGUNKNOWNFRAGMENT_H
+#define LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGUNKNOWNFRAGMENT_H
+
+#include "llvm/DebugInfo/CodeView/DebugSubsection.h"
+#include "llvm/Support/BinaryStreamRef.h"
+
+namespace llvm {
+namespace codeview {
+
+class DebugUnknownSubsectionRef final : public DebugSubsectionRef {
+public:
+ DebugUnknownSubsectionRef(DebugSubsectionKind Kind, BinaryStreamRef Data)
+ : DebugSubsectionRef(Kind), Data(Data) {}
+
+ BinaryStreamRef getData() const { return Data; }
+
+private:
+ BinaryStreamRef Data;
+};
+}
+}
+
+#endif
Modified: projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolVisitorDelegate.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolVisitorDelegate.h Tue May 30 18:08:33 2017 (r319249)
+++ projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolVisitorDelegate.h Tue May 30 19:24:09 2017 (r319250)
@@ -19,7 +19,7 @@ class BinaryStreamReader;
namespace codeview {
-class StringTableRef;
+class DebugStringTableSubsectionRef;
class SymbolVisitorDelegate {
public:
@@ -27,7 +27,7 @@ class SymbolVisitorDelegate { (public)
virtual uint32_t getRecordOffset(BinaryStreamReader Reader) = 0;
virtual StringRef getFileNameForFileOffset(uint32_t FileOffset) = 0;
- virtual StringTableRef getStringTable() = 0;
+ virtual DebugStringTableSubsectionRef getStringTable() = 0;
};
} // end namespace codeview
Modified: projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h
==============================================================================
--- projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h Tue May 30 18:08:33 2017 (r319249)
+++ projects/clang500-import/contrib/llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h Tue May 30 19:24:09 2017 (r319250)
@@ -11,9 +11,9 @@
#define LLVM_DEBUGINFO_PDB_RAW_DBIMODULEDESCRIPTORBUILDER_H
#include "llvm/ADT/StringRef.h"
-#include "llvm/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.h"
-#include "llvm/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.h"
-#include "llvm/DebugInfo/CodeView/ModuleDebugLineFragment.h"
+#include "llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h"
+#include "llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h"
+#include "llvm/DebugInfo/CodeView/DebugLinesSubsection.h"
#include "llvm/DebugInfo/CodeView/SymbolRecord.h"
#include "llvm/DebugInfo/PDB/Native/RawTypes.h"
#include "llvm/Support/Error.h"
@@ -25,7 +25,7 @@ namespace llvm {
class BinaryStreamWriter;
namespace codeview {
-class ModuleDebugFragmentRecordBuilder;
+class DebugSubsectionRecordBuilder;
}
namespace msf {
@@ -49,11 +49,11 @@ class DbiModuleDescriptorBuilder { (public)
void setObjFileName(StringRef Name);
void addSymbol(codeview::CVSymbol Symbol);
- void addC13Fragment(std::unique_ptr<codeview::ModuleDebugLineFragment> Lines);
+ void addC13Fragment(std::unique_ptr<codeview::DebugLinesSubsection> Lines);
void addC13Fragment(
- std::unique_ptr<codeview::ModuleDebugInlineeLineFragment> Inlinees);
+ std::unique_ptr<codeview::DebugInlineeLinesSubsection> Inlinees);
void setC13FileChecksums(
- std::unique_ptr<codeview::ModuleDebugFileChecksumFragment> Checksums);
+ std::unique_ptr<codeview::DebugChecksumsSubsection> Checksums);
uint16_t getStreamIndex() const;
StringRef getModuleName() const { return ModuleName; }
@@ -83,12 +83,11 @@ class DbiModuleDescriptorBuilder { (public)
std::vector<std::string> SourceFiles;
std::vector<codeview::CVSymbol> Symbols;
- std::unique_ptr<codeview::ModuleDebugFileChecksumFragment> ChecksumInfo;
- std::vector<std::unique_ptr<codeview::ModuleDebugLineFragment>> LineInfo;
- std::vector<std::unique_ptr<codeview::ModuleDebugInlineeLineFragment>>
- Inlinees;
+ std::unique_ptr<codeview::DebugChecksumsSubsection> ChecksumInfo;
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list