1 //===-- TypeIndex.cpp - CodeView type index ---------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "llvm/DebugInfo/CodeView/TypeIndex.h"
12 #include "llvm/DebugInfo/CodeView/TypeCollection.h"
13 #include "llvm/Support/ScopedPrinter.h"
16 using namespace llvm::codeview;
18 void llvm::codeview::printTypeIndex(ScopedPrinter &Printer, StringRef FieldName,
19 TypeIndex TI, TypeCollection &Types) {
22 TypeName = Types.getTypeName(TI);
23 if (!TypeName.empty())
24 Printer.printHex(FieldName, TypeName, TI.getIndex());
26 Printer.printHex(FieldName, TI.getIndex());