LLVM  5.0.0
Classes | Functions
CodeViewDebug.cpp File Reference
#include "CodeViewDebug.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/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/STLExtras.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/Config/llvm-config.h"
#include "llvm/DebugInfo/CodeView/CVTypeVisitor.h"
#include "llvm/DebugInfo/CodeView/CodeView.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/Compiler.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ScopedPrinter.h"
#include "llvm/Support/SMLoc.h"
#include "llvm/Target/TargetFrameLowering.h"
#include "llvm/Target/TargetLoweringObjectFile.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetSubtargetInfo.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
 

Functions

static StringRef getPrettyScopeName (const DIScope *Scope)
 
static const DISubprogram * getQualifiedNameComponents (const DIScope *Scope, SmallVectorImpl< StringRef > &QualifiedNameComponents)
 
static std::string getQualifiedName (ArrayRef< StringRef > QualifiedNameComponents, StringRef TypeName)
 
static std::string getFullyQualifiedName (const DIScope *Scope, StringRef Name)
 
static std::string getFullyQualifiedName (const DIScope *Ty)
 
static void addLocIfNotPresent (SmallVectorImpl< const DILocation * > &Locs, const DILocation *Loc)
 
static void emitNullTerminatedSymbolName (MCStreamer &OS, StringRef S)
 
static
PointerToMemberRepresentation 
translatePtrToMemberRep (unsigned SizeInBytes, bool IsPMF, unsigned Flags)
 
static CallingConvention dwarfCCToCodeView (unsigned DwarfCC)
 Given a DWARF calling convention, get the CodeView equivalent. More...
 
static MemberAccess translateAccessFlags (unsigned RecordTag, unsigned Flags)
 
static MethodOptions translateMethodOptionFlags (const DISubprogram *SP)
 
static MethodKind translateMethodKindFlags (const DISubprogram *SP, bool Introduced)
 
static TypeRecordKind getRecordKind (const DICompositeType *Ty)
 
static ClassOptions getCommonClassOptions (const DICompositeType *Ty)
 Return ClassOptions that should be present on both the forward declaration and the defintion of a tag type. More...
 

Function Documentation

static void addLocIfNotPresent ( SmallVectorImpl< const DILocation * > &  Locs,
const DILocation *  Loc 
)
static
static CallingConvention dwarfCCToCodeView ( unsigned  DwarfCC)
static

Given a DWARF calling convention, get the CodeView equivalent.

If we don't have a translation, use the NearC convention.

Definition at line 1401 of file CodeViewDebug.cpp.

static void emitNullTerminatedSymbolName ( MCStreamer &  OS,
StringRef  S 
)
static
static ClassOptions getCommonClassOptions ( const DICompositeType *  Ty)
static

Return ClassOptions that should be present on both the forward declaration and the defintion of a tag type.

Definition at line 1560 of file CodeViewDebug.cpp.

References llvm::StringRef::empty(), llvm::DICompositeType::getIdentifier(), llvm::DIType::getScope(), llvm::None, and llvm::TypedDINodeRef< T >::resolve().

static std::string getFullyQualifiedName ( const DIScope *  Scope,
StringRef  Name 
)
static

Definition at line 235 of file CodeViewDebug.cpp.

References getQualifiedName(), and getQualifiedNameComponents().

Referenced by getFullyQualifiedName().

static std::string getFullyQualifiedName ( const DIScope *  Ty)
static
static StringRef getPrettyScopeName ( const DIScope *  Scope)
static
static std::string getQualifiedName ( ArrayRef< StringRef >  QualifiedNameComponents,
StringRef  TypeName 
)
static

Definition at line 223 of file CodeViewDebug.cpp.

References llvm::reverse().

Referenced by getFullyQualifiedName().

static const DISubprogram* getQualifiedNameComponents ( const DIScope *  Scope,
SmallVectorImpl< StringRef > &  QualifiedNameComponents 
)
static
static TypeRecordKind getRecordKind ( const DICompositeType *  Ty)
static
static MemberAccess translateAccessFlags ( unsigned  RecordTag,
unsigned  Flags 
)
static

Definition at line 1509 of file CodeViewDebug.cpp.

References llvm::DINode::FlagAccessibility, and llvm_unreachable().

static MethodKind translateMethodKindFlags ( const DISubprogram *  SP,
bool  Introduced 
)
static

Definition at line 1531 of file CodeViewDebug.cpp.

References llvm_unreachable().

static MethodOptions translateMethodOptionFlags ( const DISubprogram *  SP)
static

Definition at line 1522 of file CodeViewDebug.cpp.

References llvm::None.

static PointerToMemberRepresentation translatePtrToMemberRep ( unsigned  SizeInBytes,
bool  IsPMF,
unsigned  Flags 
)
static