1296077Sadrian//===-- llvm/CodeGen/DwarfCompileUnit.h - Dwarf Compile Unit ---*- C++ -*--===// 2296077Sadrian// 3296077Sadrian// The LLVM Compiler Infrastructure 4296077Sadrian// 5296077Sadrian// This file is distributed under the University of Illinois Open Source 6296077Sadrian// License. See LICENSE.TXT for details. 7296077Sadrian// 8296077Sadrian//===----------------------------------------------------------------------===// 9296077Sadrian// 10296077Sadrian// This file contains support for writing dwarf compile unit. 11296077Sadrian// 12296077Sadrian//===----------------------------------------------------------------------===// 13296077Sadrian 14296077Sadrian#ifndef CODEGEN_ASMPRINTER_DWARFCOMPILEUNIT_H 15296077Sadrian#define CODEGEN_ASMPRINTER_DWARFCOMPILEUNIT_H 16296077Sadrian 17296077Sadrian#include "DIE.h" 18296077Sadrian#include "DwarfDebug.h" 19296077Sadrian#include "llvm/ADT/DenseMap.h" 20296077Sadrian#include "llvm/ADT/Optional.h" 21296077Sadrian#include "llvm/ADT/OwningPtr.h" 22296077Sadrian#include "llvm/ADT/StringMap.h" 23296077Sadrian#include "llvm/DebugInfo.h" 24296077Sadrian#include "llvm/MC/MCExpr.h" 25296077Sadrian 26296077Sadriannamespace llvm { 27296077Sadrian 28296077Sadrianclass MachineLocation; 29296077Sadrianclass MachineOperand; 30296077Sadrianclass ConstantInt; 31296077Sadrianclass ConstantFP; 32296077Sadrianclass DbgVariable; 33296077Sadrian 34296077Sadrian//===----------------------------------------------------------------------===// 35296077Sadrian/// CompileUnit - This dwarf writer support class manages information associated 36296077Sadrian/// with a source file. 37296077Sadrianclass CompileUnit { 38296077Sadrian /// UniqueID - a numeric ID unique among all CUs in the module 39296077Sadrian /// 40296077Sadrian unsigned UniqueID; 41296077Sadrian 42296077Sadrian /// Node - MDNode for the compile unit. 43296077Sadrian DICompileUnit Node; 44296077Sadrian 45296077Sadrian /// CUDie - Compile unit debug information entry. 46296077Sadrian /// 47296077Sadrian const OwningPtr<DIE> CUDie; 48296077Sadrian 49296077Sadrian /// Asm - Target of Dwarf emission. 50296077Sadrian AsmPrinter *Asm; 51296077Sadrian 52296077Sadrian // Holders for some common dwarf information. 53296077Sadrian DwarfDebug *DD; 54296077Sadrian DwarfUnits *DU; 55299097Sadrian 56296077Sadrian /// IndexTyDie - An anonymous type for index type. Owned by CUDie. 57296077Sadrian DIE *IndexTyDie; 58296077Sadrian 59296077Sadrian /// MDNodeToDieMap - Tracks the mapping of unit level debug information 60296077Sadrian /// variables to debug information entries. 61296077Sadrian DenseMap<const MDNode *, DIE *> MDNodeToDieMap; 62296077Sadrian 63296077Sadrian /// MDNodeToDIEEntryMap - Tracks the mapping of unit level debug information 64296077Sadrian /// descriptors to debug information entries using a DIEEntry proxy. 65296077Sadrian DenseMap<const MDNode *, DIEEntry *> MDNodeToDIEEntryMap; 66296077Sadrian 67296077Sadrian /// GlobalNames - A map of globally visible named entities for this unit. 68296077Sadrian /// 69296077Sadrian StringMap<DIE *> GlobalNames; 70296077Sadrian 71296077Sadrian /// GlobalTypes - A map of globally visible types for this unit. 72296077Sadrian /// 73296077Sadrian StringMap<DIE *> GlobalTypes; 74296077Sadrian 75296077Sadrian /// AccelNames - A map of names for the name accelerator table. 76296077Sadrian /// 77296077Sadrian StringMap<std::vector<DIE *> > AccelNames; 78296077Sadrian StringMap<std::vector<DIE *> > AccelObjC; 79296077Sadrian StringMap<std::vector<DIE *> > AccelNamespace; 80296077Sadrian StringMap<std::vector<std::pair<DIE *, unsigned> > > AccelTypes; 81296077Sadrian 82296077Sadrian /// DIEBlocks - A list of all the DIEBlocks in use. 83296077Sadrian std::vector<DIEBlock *> DIEBlocks; 84296077Sadrian 85296077Sadrian /// ContainingTypeMap - This map is used to keep track of subprogram DIEs that 86296077Sadrian /// need DW_AT_containing_type attribute. This attribute points to a DIE that 87296077Sadrian /// corresponds to the MDNode mapped with the subprogram DIE. 88296077Sadrian DenseMap<DIE *, const MDNode *> ContainingTypeMap; 89296077Sadrian 90296077Sadrian // DIEValueAllocator - All DIEValues are allocated through this allocator. 91296077Sadrian BumpPtrAllocator DIEValueAllocator; 92296077Sadrian 93296077Sadrian // DIEIntegerOne - A preallocated DIEValue because 1 is used frequently. 94296077Sadrian DIEInteger *DIEIntegerOne; 95296077Sadrian 96296077Sadrianpublic: 97296077Sadrian CompileUnit(unsigned UID, DIE *D, DICompileUnit CU, AsmPrinter *A, 98296077Sadrian DwarfDebug *DW, DwarfUnits *DWU); 99296077Sadrian ~CompileUnit(); 100296077Sadrian 101296077Sadrian // Accessors. 102296077Sadrian unsigned getUniqueID() const { return UniqueID; } 103296077Sadrian uint16_t getLanguage() const { return Node.getLanguage(); } 104296077Sadrian DICompileUnit getNode() const { return Node; } 105296077Sadrian DIE *getCUDie() const { return CUDie.get(); } 106296077Sadrian const StringMap<DIE *> &getGlobalNames() const { return GlobalNames; } 107296077Sadrian const StringMap<DIE *> &getGlobalTypes() const { return GlobalTypes; } 108296077Sadrian 109296077Sadrian const StringMap<std::vector<DIE *> > &getAccelNames() const { 110296077Sadrian return AccelNames; 111296077Sadrian } 112296077Sadrian const StringMap<std::vector<DIE *> > &getAccelObjC() const { 113296077Sadrian return AccelObjC; 114296077Sadrian } 115296077Sadrian const StringMap<std::vector<DIE *> > &getAccelNamespace() const { 116296077Sadrian return AccelNamespace; 117296077Sadrian } 118296077Sadrian const StringMap<std::vector<std::pair<DIE *, unsigned> > > & 119296077Sadrian getAccelTypes() const { 120296077Sadrian return AccelTypes; 121296077Sadrian } 122296077Sadrian 123296077Sadrian unsigned getDebugInfoOffset() const { return DebugInfoOffset; } 124296077Sadrian void setDebugInfoOffset(unsigned DbgInfoOff) { DebugInfoOffset = DbgInfoOff; } 125296077Sadrian 126296077Sadrian /// hasContent - Return true if this compile unit has something to write out. 127296077Sadrian /// 128296077Sadrian bool hasContent() const { return !CUDie->getChildren().empty(); } 129296077Sadrian 130296077Sadrian /// getParentContextString - Get a string containing the language specific 131296077Sadrian /// context for a global name. 132296077Sadrian std::string getParentContextString(DIScope Context) const; 133296077Sadrian 134296077Sadrian /// addGlobalName - Add a new global entity to the compile unit. 135296077Sadrian /// 136296077Sadrian void addGlobalName(StringRef Name, DIE *Die, DIScope Context); 137296077Sadrian 138296077Sadrian /// addGlobalType - Add a new global type to the compile unit. 139296077Sadrian /// 140296077Sadrian void addGlobalType(DIType Ty); 141296077Sadrian 142296077Sadrian /// addPubTypes - Add a set of types from the subprogram to the global types. 143296077Sadrian void addPubTypes(DISubprogram SP); 144296077Sadrian 145296077Sadrian /// addAccelName - Add a new name to the name accelerator table. 146296077Sadrian void addAccelName(StringRef Name, DIE *Die); 147296077Sadrian 148296077Sadrian /// addAccelObjC - Add a new name to the ObjC accelerator table. 149296077Sadrian void addAccelObjC(StringRef Name, DIE *Die); 150296077Sadrian 151296077Sadrian /// addAccelNamespace - Add a new name to the namespace accelerator table. 152296077Sadrian void addAccelNamespace(StringRef Name, DIE *Die); 153296077Sadrian 154296077Sadrian /// addAccelType - Add a new type to the type accelerator table. 155296077Sadrian void addAccelType(StringRef Name, std::pair<DIE *, unsigned> Die); 156296077Sadrian 157296077Sadrian /// getDIE - Returns the debug information entry map slot for the 158296077Sadrian /// specified debug variable. We delegate the request to DwarfDebug 159296077Sadrian /// when the MDNode can be part of the type system, since DIEs for 160296077Sadrian /// the type system can be shared across CUs and the mappings are 161296077Sadrian /// kept in DwarfDebug. 162296077Sadrian DIE *getDIE(DIDescriptor D) const; 163296077Sadrian 164296077Sadrian DIEBlock *getDIEBlock() { return new (DIEValueAllocator) DIEBlock(); } 165296077Sadrian 166296077Sadrian /// insertDIE - Insert DIE into the map. We delegate the request to DwarfDebug 167296077Sadrian /// when the MDNode can be part of the type system, since DIEs for 168296077Sadrian /// the type system can be shared across CUs and the mappings are 169296077Sadrian /// kept in DwarfDebug. 170296077Sadrian void insertDIE(DIDescriptor Desc, DIE *D); 171296077Sadrian 172296077Sadrian /// addDie - Adds or interns the DIE to the compile unit. 173296077Sadrian /// 174296077Sadrian void addDie(DIE *Buffer) { CUDie->addChild(Buffer); } 175296077Sadrian 176296077Sadrian /// addFlag - Add a flag that is true to the DIE. 177296077Sadrian void addFlag(DIE *Die, dwarf::Attribute Attribute); 178296077Sadrian 179296077Sadrian /// addUInt - Add an unsigned integer attribute data and value. 180296077Sadrian /// 181296077Sadrian void addUInt(DIE *Die, dwarf::Attribute Attribute, Optional<dwarf::Form> Form, 182296077Sadrian uint64_t Integer); 183296077Sadrian 184296077Sadrian void addUInt(DIEBlock *Block, dwarf::Form Form, uint64_t Integer); 185298276Sadrian 186298276Sadrian /// addSInt - Add an signed integer attribute data and value. 187298276Sadrian /// 188298276Sadrian void addSInt(DIE *Die, dwarf::Attribute Attribute, Optional<dwarf::Form> Form, 189298276Sadrian int64_t Integer); 190298276Sadrian 191298276Sadrian void addSInt(DIEBlock *Die, Optional<dwarf::Form> Form, int64_t Integer); 192298276Sadrian 193298276Sadrian /// addString - Add a string attribute data and value. 194298276Sadrian /// 195298276Sadrian void addString(DIE *Die, dwarf::Attribute Attribute, const StringRef Str); 196298276Sadrian 197298276Sadrian /// addLocalString - Add a string attribute data and value. 198298276Sadrian /// 199298276Sadrian void addLocalString(DIE *Die, dwarf::Attribute Attribute, const StringRef Str); 200298276Sadrian 201298276Sadrian /// addExpr - Add a Dwarf expression attribute data and value. 202298276Sadrian /// 203298276Sadrian void addExpr(DIEBlock *Die, dwarf::Form Form, const MCExpr *Expr); 204298276Sadrian 205298276Sadrian /// addLabel - Add a Dwarf label attribute data and value. 206298276Sadrian /// 207298276Sadrian void addLabel(DIE *Die, dwarf::Attribute Attribute, dwarf::Form Form, 208298276Sadrian const MCSymbol *Label); 209298276Sadrian 210298276Sadrian void addLabel(DIEBlock *Die, dwarf::Form Form, const MCSymbol *Label); 211298276Sadrian 212298276Sadrian /// addSectionLabel - Add a Dwarf section label attribute data and value. 213298276Sadrian /// 214298276Sadrian void addSectionLabel(DIE *Die, dwarf::Attribute Attribute, const MCSymbol *Label); 215298276Sadrian 216298276Sadrian /// addSectionOffset - Add an offset into a section attribute data and value. 217298276Sadrian /// 218296077Sadrian void addSectionOffset(DIE *Die, dwarf::Attribute Attribute, uint64_t Integer); 219296077Sadrian 220296077Sadrian /// addLabelAddress - Add a dwarf label attribute data and value using 221296077Sadrian /// either DW_FORM_addr or DW_FORM_GNU_addr_index. 222296077Sadrian /// 223296077Sadrian void addLabelAddress(DIE *Die, dwarf::Attribute Attribute, MCSymbol *Label); 224296077Sadrian 225296077Sadrian /// addOpAddress - Add a dwarf op address data and value using the 226296077Sadrian /// form given and an op of either DW_FORM_addr or DW_FORM_GNU_addr_index. 227296077Sadrian /// 228296077Sadrian void addOpAddress(DIEBlock *Die, const MCSymbol *Label); 229296077Sadrian 230296077Sadrian /// addSectionDelta - Add a label delta attribute data and value. 231296077Sadrian void addSectionDelta(DIE *Die, dwarf::Attribute Attribute, const MCSymbol *Hi, 232296077Sadrian const MCSymbol *Lo); 233296077Sadrian 234296077Sadrian /// addDIEEntry - Add a DIE attribute data and value. 235296077Sadrian /// 236296077Sadrian void addDIEEntry(DIE *Die, dwarf::Attribute Attribute, DIE *Entry); 237296077Sadrian 238296077Sadrian /// addDIEEntry - Add a DIE attribute data and value. 239296077Sadrian /// 240296077Sadrian void addDIEEntry(DIE *Die, dwarf::Attribute Attribute, DIEEntry *Entry); 241296077Sadrian 242296077Sadrian /// addBlock - Add block data. 243296077Sadrian /// 244296077Sadrian void addBlock(DIE *Die, dwarf::Attribute Attribute, DIEBlock *Block); 245296077Sadrian 246296077Sadrian /// addSourceLine - Add location information to specified debug information 247296077Sadrian /// entry. 248296077Sadrian void addSourceLine(DIE *Die, DIVariable V); 249296077Sadrian void addSourceLine(DIE *Die, DIGlobalVariable G); 250296077Sadrian void addSourceLine(DIE *Die, DISubprogram SP); 251296077Sadrian void addSourceLine(DIE *Die, DIType Ty); 252296077Sadrian void addSourceLine(DIE *Die, DINameSpace NS); 253296077Sadrian void addSourceLine(DIE *Die, DIObjCProperty Ty); 254296077Sadrian 255296077Sadrian /// addAddress - Add an address attribute to a die based on the location 256296077Sadrian /// provided. 257296077Sadrian void addAddress(DIE *Die, dwarf::Attribute Attribute, const MachineLocation &Location, 258296077Sadrian bool Indirect = false); 259296077Sadrian 260296077Sadrian /// addConstantValue - Add constant value entry in variable DIE. 261296077Sadrian void addConstantValue(DIE *Die, const MachineOperand &MO, DIType Ty); 262296077Sadrian void addConstantValue(DIE *Die, const ConstantInt *CI, bool Unsigned); 263296077Sadrian void addConstantValue(DIE *Die, const APInt &Val, bool Unsigned); 264296077Sadrian 265296077Sadrian /// addConstantFPValue - Add constant value entry in variable DIE. 266296077Sadrian void addConstantFPValue(DIE *Die, const MachineOperand &MO); 267296077Sadrian void addConstantFPValue(DIE *Die, const ConstantFP *CFP); 268296077Sadrian 269296077Sadrian /// addTemplateParams - Add template parameters in buffer. 270298276Sadrian void addTemplateParams(DIE &Buffer, DIArray TParams); 271296077Sadrian 272296077Sadrian /// addRegisterOp - Add register operand. 273298276Sadrian void addRegisterOp(DIEBlock *TheDie, unsigned Reg); 274298276Sadrian 275296077Sadrian /// addRegisterOffset - Add register offset. 276296077Sadrian void addRegisterOffset(DIEBlock *TheDie, unsigned Reg, int64_t Offset); 277296077Sadrian 278296077Sadrian /// addComplexAddress - Start with the address based on the location provided, 279296077Sadrian /// and generate the DWARF information necessary to find the actual variable 280296077Sadrian /// (navigating the extra location information encoded in the type) based on 281296077Sadrian /// the starting location. Add the DWARF information to the die. 282296077Sadrian /// 283296077Sadrian void addComplexAddress(const DbgVariable &DV, DIE *Die, dwarf::Attribute Attribute, 284296077Sadrian const MachineLocation &Location); 285296077Sadrian 286296077Sadrian // FIXME: Should be reformulated in terms of addComplexAddress. 287298276Sadrian /// addBlockByrefAddress - Start with the address based on the location 288298276Sadrian /// provided, and generate the DWARF information necessary to find the 289298276Sadrian /// actual Block variable (navigating the Block struct) based on the 290298276Sadrian /// starting location. Add the DWARF information to the die. Obsolete, 291298276Sadrian /// please use addComplexAddress instead. 292298276Sadrian /// 293298276Sadrian void addBlockByrefAddress(const DbgVariable &DV, DIE *Die, dwarf::Attribute Attribute, 294298276Sadrian const MachineLocation &Location); 295298276Sadrian 296298276Sadrian /// addVariableAddress - Add DW_AT_location attribute for a 297298276Sadrian /// DbgVariable based on provided MachineLocation. 298298276Sadrian void addVariableAddress(const DbgVariable &DV, DIE *Die, 299298276Sadrian MachineLocation Location); 300298276Sadrian 301298276Sadrian /// addType - Add a new type attribute to the specified entity. This takes 302298276Sadrian /// and attribute parameter because DW_AT_friend attributes are also 303298276Sadrian /// type references. 304298276Sadrian void addType(DIE *Entity, DIType Ty, dwarf::Attribute Attribute = dwarf::DW_AT_type); 305298276Sadrian 306298276Sadrian /// getOrCreateNameSpace - Create a DIE for DINameSpace. 307298276Sadrian DIE *getOrCreateNameSpace(DINameSpace NS); 308298276Sadrian 309298276Sadrian /// getOrCreateSubprogramDIE - Create new DIE using SP. 310298276Sadrian DIE *getOrCreateSubprogramDIE(DISubprogram SP); 311298276Sadrian 312298276Sadrian /// getOrCreateTypeDIE - Find existing DIE or create new DIE for the 313298276Sadrian /// given DIType. 314298276Sadrian DIE *getOrCreateTypeDIE(const MDNode *N); 315298276Sadrian 316298276Sadrian /// getOrCreateContextDIE - Get context owner's DIE. 317298276Sadrian DIE *getOrCreateContextDIE(DIScope Context); 318296077Sadrian 319296077Sadrian /// createGlobalVariableDIE - create global variable DIE. 320296077Sadrian void createGlobalVariableDIE(DIGlobalVariable GV); 321296077Sadrian 322296077Sadrian /// constructContainingTypeDIEs - Construct DIEs for types that contain 323296077Sadrian /// vtables. 324296077Sadrian void constructContainingTypeDIEs(); 325296077Sadrian 326296077Sadrian /// constructVariableDIE - Construct a DIE for the given DbgVariable. 327296077Sadrian DIE *constructVariableDIE(DbgVariable &DV, bool isScopeAbstract); 328296077Sadrian 329296077Sadrian /// Create a DIE with the given Tag, add the DIE to its parent, and 330296077Sadrian /// call insertDIE if MD is not null. 331296077Sadrian DIE *createAndAddDIE(unsigned Tag, DIE &Parent, DIDescriptor N = DIDescriptor()); 332296077Sadrian 333296077Sadrian /// Compute the size of a header for this unit, not including the initial 334296077Sadrian /// length field. 335296077Sadrian unsigned getHeaderSize() const { 336296077Sadrian return sizeof(int16_t) + // DWARF version number 337296077Sadrian sizeof(int32_t) + // Offset Into Abbrev. Section 338296077Sadrian sizeof(int8_t); // Pointer Size (in bytes) 339296077Sadrian } 340296077Sadrian 341296077Sadrian /// Emit the header for this unit, not including the initial length field. 342296077Sadrian void emitHeader(const MCSection *ASection, const MCSymbol *ASectionSym); 343296077Sadrian 344296077Sadrianprivate: 345296077Sadrian /// constructSubprogramArguments - Construct function argument DIEs. 346296077Sadrian void constructSubprogramArguments(DIE &Buffer, DIArray Args); 347296077Sadrian 348296077Sadrian /// constructTypeDIE - Construct basic type die from DIBasicType. 349296077Sadrian void constructTypeDIE(DIE &Buffer, DIBasicType BTy); 350296077Sadrian 351296077Sadrian /// constructTypeDIE - Construct derived type die from DIDerivedType. 352296077Sadrian void constructTypeDIE(DIE &Buffer, DIDerivedType DTy); 353298276Sadrian 354298276Sadrian /// constructTypeDIE - Construct type DIE from DICompositeType. 355298276Sadrian void constructTypeDIE(DIE &Buffer, DICompositeType CTy); 356298276Sadrian 357298276Sadrian /// constructSubrangeDIE - Construct subrange DIE from DISubrange. 358298276Sadrian void constructSubrangeDIE(DIE &Buffer, DISubrange SR, DIE *IndexTy); 359298276Sadrian 360298276Sadrian /// constructArrayTypeDIE - Construct array type DIE from DICompositeType. 361298276Sadrian void constructArrayTypeDIE(DIE &Buffer, DICompositeType CTy); 362298276Sadrian 363298276Sadrian /// constructEnumTypeDIE - Construct enum type DIE from DIEnumerator. 364298276Sadrian void constructEnumTypeDIE(DIE &Buffer, DICompositeType CTy); 365298276Sadrian 366298276Sadrian /// constructMemberDIE - Construct member DIE from DIDerivedType. 367298276Sadrian void constructMemberDIE(DIE &Buffer, DIDerivedType DT); 368298276Sadrian 369298276Sadrian /// constructTemplateTypeParameterDIE - Construct new DIE for the given 370298276Sadrian /// DITemplateTypeParameter. 371298276Sadrian void constructTemplateTypeParameterDIE(DIE &Buffer, 372298276Sadrian DITemplateTypeParameter TP); 373296077Sadrian 374296077Sadrian /// constructTemplateValueParameterDIE - Construct new DIE for the given 375296077Sadrian /// DITemplateValueParameter. 376296077Sadrian void constructTemplateValueParameterDIE(DIE &Buffer, 377296077Sadrian DITemplateValueParameter TVP); 378296077Sadrian 379296077Sadrian /// getOrCreateStaticMemberDIE - Create new static data member DIE. 380296077Sadrian DIE *getOrCreateStaticMemberDIE(DIDerivedType DT); 381296077Sadrian 382296077Sadrian /// Offset of the CUDie from beginning of debug info section. 383296077Sadrian unsigned DebugInfoOffset; 384296077Sadrian 385296077Sadrian /// getLowerBoundDefault - Return the default lower bound for an array. If the 386296077Sadrian /// DWARF version doesn't handle the language, return -1. 387296077Sadrian int64_t getDefaultLowerBound() const; 388296077Sadrian 389296077Sadrian /// getDIEEntry - Returns the debug information entry for the specified 390296077Sadrian /// debug variable. 391296077Sadrian DIEEntry *getDIEEntry(const MDNode *N) const { 392296077Sadrian return MDNodeToDIEEntryMap.lookup(N); 393296077Sadrian } 394296077Sadrian 395296077Sadrian /// insertDIEEntry - Insert debug information entry into the map. 396296077Sadrian void insertDIEEntry(const MDNode *N, DIEEntry *E) { 397296077Sadrian MDNodeToDIEEntryMap.insert(std::make_pair(N, E)); 398296077Sadrian } 399296077Sadrian 400296077Sadrian // getIndexTyDie - Get an anonymous type for index type. 401296077Sadrian DIE *getIndexTyDie() { return IndexTyDie; } 402296077Sadrian 403296077Sadrian // setIndexTyDie - Set D as anonymous type for index which can be reused 404296077Sadrian // later. 405296077Sadrian void setIndexTyDie(DIE *D) { IndexTyDie = D; } 406296077Sadrian 407296077Sadrian /// createDIEEntry - Creates a new DIEEntry to be a proxy for a debug 408296077Sadrian /// information entry. 409296077Sadrian DIEEntry *createDIEEntry(DIE *Entry); 410296077Sadrian 411296077Sadrian /// resolve - Look in the DwarfDebug map for the MDNode that 412296077Sadrian /// corresponds to the reference. 413296077Sadrian template <typename T> T resolve(DIRef<T> Ref) const { 414296077Sadrian return DD->resolve(Ref); 415296077Sadrian } 416296077Sadrian}; 417296077Sadrian 418296077Sadrian} // end llvm namespace 419296077Sadrian#endif 420296077Sadrian