|
LLVM
7.0.0
|
#include "CodeViewDebug.h"#include "DwarfExpression.h"#include "llvm/ADT/APSInt.h"#include "llvm/ADT/ArrayRef.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/DenseSet.h"#include "llvm/ADT/MapVector.h"#include "llvm/ADT/None.h"#include "llvm/ADT/Optional.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallString.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/StringRef.h"#include "llvm/ADT/TinyPtrVector.h"#include "llvm/ADT/Triple.h"#include "llvm/ADT/Twine.h"#include "llvm/BinaryFormat/COFF.h"#include "llvm/BinaryFormat/Dwarf.h"#include "llvm/CodeGen/AsmPrinter.h"#include "llvm/CodeGen/LexicalScopes.h"#include "llvm/CodeGen/MachineFunction.h"#include "llvm/CodeGen/MachineInstr.h"#include "llvm/CodeGen/MachineModuleInfo.h"#include "llvm/CodeGen/MachineOperand.h"#include "llvm/CodeGen/TargetFrameLowering.h"#include "llvm/CodeGen/TargetRegisterInfo.h"#include "llvm/CodeGen/TargetSubtargetInfo.h"#include "llvm/Config/llvm-config.h"#include "llvm/DebugInfo/CodeView/CVTypeVisitor.h"#include "llvm/DebugInfo/CodeView/CodeView.h"#include "llvm/DebugInfo/CodeView/ContinuationRecordBuilder.h"#include "llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h"#include "llvm/DebugInfo/CodeView/Line.h"#include "llvm/DebugInfo/CodeView/SymbolRecord.h"#include "llvm/DebugInfo/CodeView/TypeDumpVisitor.h"#include "llvm/DebugInfo/CodeView/TypeIndex.h"#include "llvm/DebugInfo/CodeView/TypeRecord.h"#include "llvm/DebugInfo/CodeView/TypeTableCollection.h"#include "llvm/IR/Constants.h"#include "llvm/IR/DataLayout.h"#include "llvm/IR/DebugInfoMetadata.h"#include "llvm/IR/DebugLoc.h"#include "llvm/IR/Function.h"#include "llvm/IR/GlobalValue.h"#include "llvm/IR/GlobalVariable.h"#include "llvm/IR/Metadata.h"#include "llvm/IR/Module.h"#include "llvm/MC/MCAsmInfo.h"#include "llvm/MC/MCContext.h"#include "llvm/MC/MCSectionCOFF.h"#include "llvm/MC/MCStreamer.h"#include "llvm/MC/MCSymbol.h"#include "llvm/Support/BinaryByteStream.h"#include "llvm/Support/BinaryStreamReader.h"#include "llvm/Support/Casting.h"#include "llvm/Support/CommandLine.h"#include "llvm/Support/Compiler.h"#include "llvm/Support/Endian.h"#include "llvm/Support/Error.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/FormatVariadic.h"#include "llvm/Support/SMLoc.h"#include "llvm/Support/ScopedPrinter.h"#include "llvm/Target/TargetLoweringObjectFile.h"#include "llvm/Target/TargetMachine.h"#include <algorithm>#include <cassert>#include <cctype>#include <cstddef>#include <cstdint>#include <iterator>#include <limits>#include <string>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| struct | llvm::CodeViewDebug::TypeLoweringScope |
| struct | llvm::ClassInfo |
| struct | llvm::ClassInfo::MemberInfo |
Variables | |
| static cl::opt< bool > | EmitDebugGlobalHashes ("emit-codeview-ghash-section", cl::ReallyHidden, cl::init(false)) |
|
static |
Definition at line 390 of file CodeViewDebug.cpp.
References B, llvm::SmallVectorTemplateCommon< T >::begin(), llvm::COFF::DEBUG_SECTION_MAGIC, E, llvm::SmallVectorTemplateCommon< T >::end(), llvm::find(), llvm::DebugLoc::get(), llvm::DebugLoc::getCol(), llvm::DebugLoc::getLine(), llvm::DebugHandlerBase::PrevInstLoc, and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
|
static |
Definition at line 1099 of file CodeViewDebug.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::SmallVectorBase::empty(), and llvm::DbgVariableLocation::LoadChain.
Referenced by needsReferenceType().
|
static |
Given a DWARF calling convention, get the CodeView equivalent.
If we don't have a translation, use the NearC convention.
Definition at line 1613 of file CodeViewDebug.cpp.
References llvm::DebugHandlerBase::Asm, llvm::SmallVectorTemplateCommon< T >::back(), llvm::ArrayRef< T >::drop_front(), llvm::SmallVectorBase::empty(), llvm::ArrayRef< T >::empty(), llvm::ArrayRef< T >::front(), getBaseType(), llvm::DISubroutineType::getCC(), llvm::MCAsmInfo::getCodePointerSize(), llvm::DIType::getSizeInBits(), llvm::DINode::getTag(), llvm::DISubroutineType::getTypeArray(), llvm::AsmPrinter::MAI, llvm::makeArrayRef(), llvm::None, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SmallVectorBase::size(), and llvm::ArrayRef< T >::size().
|
static |
Definition at line 521 of file CodeViewDebug.cpp.
References llvm::DebugHandlerBase::Asm, assert(), B, llvm::COFF::DEBUG_HASHES_SECTION_MAGIC, llvm::StringRef::drop_front(), E, llvm::MCStreamer::EmitBytes(), llvm::errs(), llvm::formatv(), llvm::MCObjectFileInfo::getCOFFDebugTypesSection(), llvm::MCObjectFileInfo::getCOFFGlobalTypeHashesSection(), llvm::MCAsmInfo::getCommentString(), llvm::codeview::TypeIndex::getIndex(), llvm::AsmPrinter::getObjFileLowering(), llvm::Record::getType(), llvm_unreachable, llvm::logAllUnhandledErrors(), llvm::AsmPrinter::MAI, llvm::codeview::MaxRecordLength, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::ScopedPrinter::setPrefix(), llvm::SmallVectorBase::size(), llvm::raw_svector_ostream::str(), llvm::codeview::CVRecord< Kind >::str_data(), llvm::StringRef::take_front(), and llvm::codeview::visitTypeRecord().
Referenced by llvm::CodeViewDebug::beginInstruction(), mapArchToCVCPUType(), and shouldAlwaysEmitCompleteClassType().
|
static |
Return ClassOptions that should be present on both the forward declaration and the defintion of a tag type.
Definition at line 1812 of file CodeViewDebug.cpp.
References llvm::codeview::ContinuationRecordBuilder::begin(), llvm::StringRef::empty(), llvm::Enumerator, llvm::DICompositeType::getBaseType(), llvm::DICompositeType::getElements(), llvm::DIScope::getFile(), getFullyQualifiedName(), llvm::DICompositeType::getIdentifier(), llvm::DIType::getLine(), llvm::DIScope::getScope(), llvm::DIType::getScope(), llvm::DINode::getTag(), llvm::APSInt::getUnsigned(), llvm::DIType::isForwardDecl(), llvm::None, Public, llvm::TypedDINodeRef< T >::resolve(), and llvm::codeview::ContinuationRecordBuilder::writeMemberType().
Referenced by shouldAlwaysEmitCompleteClassType().
Definition at line 266 of file CodeViewDebug.cpp.
References getQualifiedName(), and getQualifiedNameComponents().
Referenced by getCommonClassOptions(), getFullyQualifiedName(), mapArchToCVCPUType(), and shouldAlwaysEmitCompleteClassType().
Definition at line 284 of file CodeViewDebug.cpp.
References assert(), llvm::Module::getDataLayout(), getFullyQualifiedName(), llvm::LexicalScope::getInlinedAt(), llvm::MachineModuleInfo::getModule(), llvm::DIScope::getName(), llvm::DataLayout::getPointerSizeInBits(), getPrettyScopeName(), llvm::DIScope::getScope(), I, llvm::AArch64CC::LS, llvm::DebugHandlerBase::MMI, llvm::TypedDINodeRef< T >::resolve(), and llvm::StringRef::split().
Definition at line 222 of file CodeViewDebug.cpp.
References llvm::StringRef::empty(), llvm::DIScope::getName(), and llvm::DINode::getTag().
Referenced by getFullyQualifiedName(), getQualifiedNameComponents(), and shouldEmitUdt().
|
static |
Definition at line 254 of file CodeViewDebug.cpp.
References llvm::reverse().
Referenced by getFullyQualifiedName(), and shouldEmitUdt().
|
static |
Definition at line 240 of file CodeViewDebug.cpp.
References llvm::dyn_cast(), getPrettyScopeName(), llvm::DIScope::getScope(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::TypedDINodeRef< T >::resolve().
Referenced by getFullyQualifiedName(), and shouldEmitUdt().
|
static |
Definition at line 1802 of file CodeViewDebug.cpp.
References llvm::DINode::getTag(), and llvm_unreachable.
Referenced by shouldAlwaysEmitCompleteClassType().
|
static |
Definition at line 672 of file CodeViewDebug.cpp.
References llvm::DebugHandlerBase::Asm, assert(), Context, llvm::MCContext::createTempSymbol(), llvm::StringRef::data(), llvm::GlobalValue::dropLLVMManglingEscape(), llvm::dyn_cast(), emitNullTerminatedSymbolName(), llvm::StringRef::empty(), llvm::LexicalScopes::findLexicalScope(), llvm::MCRegisterInfo::getCodeViewRegNum(), llvm::MCObjectFileInfo::getCOFFDebugSymbolsSection(), llvm::MCSectionCOFF::getCOMDATSymbol(), llvm::MachineModuleInfo::getContext(), llvm::DIScope::getFile(), llvm::DIScope::getFilename(), llvm::TargetFrameLowering::getFrameIndexReference(), llvm::TargetSubtargetInfo::getFrameLowering(), getFullyQualifiedName(), llvm::DebugHandlerBase::getLabelBeforeInsn(), llvm::MachineModuleInfo::getModule(), llvm::Value::getName(), llvm::DIScope::getName(), llvm::Module::getNamedMetadata(), llvm::MDNode::getNumOperands(), llvm::AsmPrinter::getObjFileLowering(), llvm::LexicalScope::getRanges(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::DIScope::getScope(), llvm::MCSymbol::getSection(), llvm::Function::getSubprogram(), llvm::MachineFunction::getSubtarget(), llvm::AsmPrinter::getSymbol(), llvm::Module::getTargetTriple(), llvm::MachineFunction::getVariableDbgInfo(), llvm::GlobalValue::hasLocalLinkage(), I, llvm::detail::DenseSetImpl< ValueT, DenseMap< ValueT, detail::DenseSetEmpty, ValueInfoT, detail::DenseSetPair< ValueT > >, ValueInfoT >::insert(), llvm::DebugHandlerBase::LScopes, MapDWLangToCVLang(), llvm::max(), llvm::AsmPrinter::MF, llvm::DebugHandlerBase::MMI, N, llvm::MDNode::operands(), llvm::NamedMDNode::operands(), parseVersion(), llvm::report_fatal_error(), llvm::TypedDINodeRef< T >::resolve(), llvm::StringRef::size(), llvm::FPOpFusion::Standard, TRI, llvm::IndexedInstrProf::Version, VI, and llvm::Triple::x86.
|
static |
Definition at line 612 of file CodeViewDebug.cpp.
References C, llvm::codeview::Cobol, llvm::codeview::Cpp, D, llvm::codeview::Fortran, llvm::codeview::Java, llvm::codeview::Masm, and llvm::IndexedInstrProf::Version.
Referenced by mapArchToCVCPUType().
|
static |
Definition at line 1103 of file CodeViewDebug.cpp.
References llvm::DebugHandlerBase::Asm, assert(), llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), canUseReferenceType(), E, llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::DbgVariableLocation::extractFromMachineInstruction(), llvm::MCRegisterInfo::getCodeViewRegNum(), llvm::DebugHandlerBase::getLabelBeforeInsn(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), I, llvm::MachineInstr::isDebugValue(), llvm::DbgVariableLocation::LoadChain, llvm::AsmPrinter::MF, llvm::SmallVectorBase::size(), and TRI.
|
static |
Definition at line 655 of file CodeViewDebug.cpp.
References C, N, and llvm::IndexedInstrProf::Version.
Referenced by getOSTypeFromMCVM(), getOSTypeFromPlatform(), and mapArchToCVCPUType().
|
static |
Definition at line 2007 of file CodeViewDebug.cpp.
References llvm::SmallVectorImpl< T >::append(), assert(), llvm::ClassInfo::MemberInfo::BaseOffset, llvm::codeview::DefRangeRegisterRelSym::Header::BasePointerOffset, llvm::codeview::ContinuationRecordBuilder::begin(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::SmallVectorImpl< char >::clear(), llvm::codeview::ContainsNestedClass, llvm::MCContext::createTempSymbol(), llvm::dyn_cast(), emitNullTerminatedSymbolName(), llvm::StringRef::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::codeview::DefRangeRegisterRelSym::Header::Flags, llvm::SmallVectorTemplateCommon< T, typename >::front(), llvm::LexicalScope::getChildren(), getCommonClassOptions(), llvm::MachineModuleInfo::getContext(), llvm::DIType::getFlags(), getFullyQualifiedName(), llvm::DICompositeType::getIdentifier(), llvm::codeview::TypeIndex::getIndex(), llvm::DebugHandlerBase::getLabelAfterInsn(), llvm::DebugHandlerBase::getLabelBeforeInsn(), llvm::DIScope::getName(), llvm::DIType::getName(), llvm::DIType::getOffsetInBits(), llvm::LexicalScope::getRanges(), getRecordKind(), llvm::LexicalScope::getScopeNode(), llvm::DIType::getSizeInBits(), llvm::DINode::getTag(), llvm::codeview::DefRangeRegisterSym::Hdr, llvm::codeview::DefRangeSubfieldRegisterSym::Hdr, llvm::codeview::DefRangeRegisterRelSym::Hdr, I, llvm::ClassInfo::Inheritance, llvm::pdb::Int32, llvm::LexicalScope::isAbstractScope(), llvm::DIType::isBitField(), llvm::DIType::isForwardDecl(), llvm::DIType::isStaticMember(), Kind, llvm_unreachable, llvm::codeview::DefRangeRegisterSym::Header::MayHaveNoName, llvm::codeview::DefRangeSubfieldRegisterSym::Header::MayHaveNoName, llvm::ClassInfo::Members, llvm::ClassInfo::MemberInfo::MemberTypeNode, llvm::ClassInfo::Methods, llvm::DebugHandlerBase::MMI, llvm::codeview::Nested, llvm::ClassInfo::NestedTypes, llvm::None, llvm::codeview::DefRangeSubfieldRegisterSym::Header::OffsetInParent, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::codeview::DefRangeRegisterSym::Header::Register, llvm::codeview::DefRangeSubfieldRegisterSym::Header::Register, llvm::codeview::DefRangeRegisterRelSym::Header::Register, llvm::report_fatal_error(), llvm::TypedDINodeRef< T >::resolve(), llvm::SmallVectorBase::size(), llvm::sort(), llvm::StringRef::startswith(), std::swap(), translateAccessFlags(), translateMethodKindFlags(), translateMethodOptionFlags(), llvm::codeview::TypeRef, llvm::ClassInfo::VShapeTI, and llvm::codeview::ContinuationRecordBuilder::writeMemberType().
Definition at line 1265 of file CodeViewDebug.cpp.
References assert(), llvm::dyn_cast(), llvm::StringRef::empty(), llvm::DICompositeType::getBaseType(), llvm::DebugHandlerBase::getBaseTypeSize(), llvm::DICompositeType::getElements(), llvm::DIBasicType::getEncoding(), getName(), llvm::DIType::getName(), getPrettyScopeName(), getQualifiedName(), getQualifiedNameComponents(), llvm::DIType::getScope(), llvm::codeview::TypeIndex::getSimpleKind(), llvm::codeview::TypeIndex::getSimpleMode(), llvm::DIType::getSizeInBits(), llvm::DINode::getTag(), llvm::pdb::Int32, llvm::DIType::isForwardDecl(), llvm::codeview::TypeIndex::isSimple(), Kind, LLVM_FALLTHROUGH, llvm_unreachable, Mode, llvm::None, llvm::TypedDINodeRef< T >::resolve(), llvm::MDNode::resolve(), T, llvm::AMDGPU::HSAMD::Kernel::Arg::Key::TypeName, and llvm::pdb::UInt32.
Referenced by llvm::CodeViewDebug::beginInstruction().
|
static |
Definition at line 1760 of file CodeViewDebug.cpp.
References llvm::DINode::FlagAccessibility, llvm_unreachable, Private, Protected, and Public.
Referenced by shouldAlwaysEmitCompleteClassType().
|
static |
Definition at line 1782 of file CodeViewDebug.cpp.
References llvm_unreachable, Static, and Virtual.
Referenced by shouldAlwaysEmitCompleteClassType().
|
static |
Definition at line 1773 of file CodeViewDebug.cpp.
References llvm::None.
Referenced by shouldAlwaysEmitCompleteClassType().
|
static |
Definition at line 1560 of file CodeViewDebug.cpp.
References assert(), llvm::DINode::FlagPtrToMemberRep, llvm::DIType::getFlags(), llvm::DIType::getSizeInBits(), llvm::DINode::getTag(), llvm_unreachable, and llvm::Unknown.
|
static |
Referenced by llvm::CodeViewDebug::endModule().
1.8.13