aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm12/lib/DebugInfo/PDB/Native/DbiModuleDescriptor.cpp
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:45:01 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:01 +0300
commit2d37894b1b037cf24231090eda8589bbb44fb6fc (patch)
treebe835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/llvm12/lib/DebugInfo/PDB/Native/DbiModuleDescriptor.cpp
parent718c552901d703c502ccbefdfc3c9028d608b947 (diff)
downloadydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/llvm12/lib/DebugInfo/PDB/Native/DbiModuleDescriptor.cpp')
-rw-r--r--contrib/libs/llvm12/lib/DebugInfo/PDB/Native/DbiModuleDescriptor.cpp172
1 files changed, 86 insertions, 86 deletions
diff --git a/contrib/libs/llvm12/lib/DebugInfo/PDB/Native/DbiModuleDescriptor.cpp b/contrib/libs/llvm12/lib/DebugInfo/PDB/Native/DbiModuleDescriptor.cpp
index 7b8cb308a8..9755f2ca3b 100644
--- a/contrib/libs/llvm12/lib/DebugInfo/PDB/Native/DbiModuleDescriptor.cpp
+++ b/contrib/libs/llvm12/lib/DebugInfo/PDB/Native/DbiModuleDescriptor.cpp
@@ -1,86 +1,86 @@
-//===- DbiModuleDescriptor.cpp - PDB module information -------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/DebugInfo/PDB/Native/DbiModuleDescriptor.h"
-#include "llvm/DebugInfo/PDB/Native/RawTypes.h"
-#include "llvm/Support/BinaryStreamReader.h"
-#include "llvm/Support/Endian.h"
-#include "llvm/Support/Error.h"
-#include "llvm/Support/MathExtras.h"
-#include <cstdint>
-
-using namespace llvm;
-using namespace llvm::pdb;
-using namespace llvm::support;
-
-Error DbiModuleDescriptor::initialize(BinaryStreamRef Stream,
- DbiModuleDescriptor &Info) {
- BinaryStreamReader Reader(Stream);
- if (auto EC = Reader.readObject(Info.Layout))
- return EC;
-
- if (auto EC = Reader.readCString(Info.ModuleName))
- return EC;
-
- if (auto EC = Reader.readCString(Info.ObjFileName))
- return EC;
- return Error::success();
-}
-
-bool DbiModuleDescriptor::hasECInfo() const {
- return (Layout->Flags & ModInfoFlags::HasECFlagMask) != 0;
-}
-
-uint16_t DbiModuleDescriptor::getTypeServerIndex() const {
- return (Layout->Flags & ModInfoFlags::TypeServerIndexMask) >>
- ModInfoFlags::TypeServerIndexShift;
-}
-
-const SectionContrib &DbiModuleDescriptor::getSectionContrib() const {
- return Layout->SC;
-}
-
-uint16_t DbiModuleDescriptor::getModuleStreamIndex() const {
- return Layout->ModDiStream;
-}
-
-uint32_t DbiModuleDescriptor::getSymbolDebugInfoByteSize() const {
- return Layout->SymBytes;
-}
-
-uint32_t DbiModuleDescriptor::getC11LineInfoByteSize() const {
- return Layout->C11Bytes;
-}
-
-uint32_t DbiModuleDescriptor::getC13LineInfoByteSize() const {
- return Layout->C13Bytes;
-}
-
-uint32_t DbiModuleDescriptor::getNumberOfFiles() const {
- return Layout->NumFiles;
-}
-
-uint32_t DbiModuleDescriptor::getSourceFileNameIndex() const {
- return Layout->SrcFileNameNI;
-}
-
-uint32_t DbiModuleDescriptor::getPdbFilePathNameIndex() const {
- return Layout->PdbFilePathNI;
-}
-
-StringRef DbiModuleDescriptor::getModuleName() const { return ModuleName; }
-
-StringRef DbiModuleDescriptor::getObjFileName() const { return ObjFileName; }
-
-uint32_t DbiModuleDescriptor::getRecordLength() const {
- uint32_t M = ModuleName.str().size() + 1;
- uint32_t O = ObjFileName.str().size() + 1;
- uint32_t Size = sizeof(ModuleInfoHeader) + M + O;
- Size = alignTo(Size, 4);
- return Size;
-}
+//===- DbiModuleDescriptor.cpp - PDB module information -------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/DebugInfo/PDB/Native/DbiModuleDescriptor.h"
+#include "llvm/DebugInfo/PDB/Native/RawTypes.h"
+#include "llvm/Support/BinaryStreamReader.h"
+#include "llvm/Support/Endian.h"
+#include "llvm/Support/Error.h"
+#include "llvm/Support/MathExtras.h"
+#include <cstdint>
+
+using namespace llvm;
+using namespace llvm::pdb;
+using namespace llvm::support;
+
+Error DbiModuleDescriptor::initialize(BinaryStreamRef Stream,
+ DbiModuleDescriptor &Info) {
+ BinaryStreamReader Reader(Stream);
+ if (auto EC = Reader.readObject(Info.Layout))
+ return EC;
+
+ if (auto EC = Reader.readCString(Info.ModuleName))
+ return EC;
+
+ if (auto EC = Reader.readCString(Info.ObjFileName))
+ return EC;
+ return Error::success();
+}
+
+bool DbiModuleDescriptor::hasECInfo() const {
+ return (Layout->Flags & ModInfoFlags::HasECFlagMask) != 0;
+}
+
+uint16_t DbiModuleDescriptor::getTypeServerIndex() const {
+ return (Layout->Flags & ModInfoFlags::TypeServerIndexMask) >>
+ ModInfoFlags::TypeServerIndexShift;
+}
+
+const SectionContrib &DbiModuleDescriptor::getSectionContrib() const {
+ return Layout->SC;
+}
+
+uint16_t DbiModuleDescriptor::getModuleStreamIndex() const {
+ return Layout->ModDiStream;
+}
+
+uint32_t DbiModuleDescriptor::getSymbolDebugInfoByteSize() const {
+ return Layout->SymBytes;
+}
+
+uint32_t DbiModuleDescriptor::getC11LineInfoByteSize() const {
+ return Layout->C11Bytes;
+}
+
+uint32_t DbiModuleDescriptor::getC13LineInfoByteSize() const {
+ return Layout->C13Bytes;
+}
+
+uint32_t DbiModuleDescriptor::getNumberOfFiles() const {
+ return Layout->NumFiles;
+}
+
+uint32_t DbiModuleDescriptor::getSourceFileNameIndex() const {
+ return Layout->SrcFileNameNI;
+}
+
+uint32_t DbiModuleDescriptor::getPdbFilePathNameIndex() const {
+ return Layout->PdbFilePathNI;
+}
+
+StringRef DbiModuleDescriptor::getModuleName() const { return ModuleName; }
+
+StringRef DbiModuleDescriptor::getObjFileName() const { return ObjFileName; }
+
+uint32_t DbiModuleDescriptor::getRecordLength() const {
+ uint32_t M = ModuleName.str().size() + 1;
+ uint32_t O = ObjFileName.str().size() + 1;
+ uint32_t Size = sizeof(ModuleInfoHeader) + M + O;
+ Size = alignTo(Size, 4);
+ return Size;
+}