DwarfDebug.h revision c1dbd5d9c30ea67ae45f190ff90e076cdf8bbc17
1//===-- llvm/CodeGen/DwarfDebug.h - Dwarf Debug Framework ------*- C++ -*--===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file contains support for writing dwarf debug info into asm files. 11// 12//===----------------------------------------------------------------------===// 13 14#ifndef CODEGEN_ASMPRINTER_DWARFDEBUG_H__ 15#define CODEGEN_ASMPRINTER_DWARFDEBUG_H__ 16 17#include "llvm/CodeGen/AsmPrinter.h" 18#include "llvm/CodeGen/MachineLocation.h" 19#include "DIE.h" 20#include "llvm/ADT/DenseMap.h" 21#include "llvm/ADT/FoldingSet.h" 22#include "llvm/ADT/SmallPtrSet.h" 23#include "llvm/ADT/StringMap.h" 24#include "llvm/ADT/UniqueVector.h" 25#include "llvm/Support/Allocator.h" 26#include "llvm/Support/DebugLoc.h" 27 28namespace llvm { 29 30class CompileUnit; 31class DbgConcreteScope; 32class DbgScope; 33class DbgVariable; 34class MachineFrameInfo; 35class MachineModuleInfo; 36class MachineOperand; 37class MCAsmInfo; 38class DIEAbbrev; 39class DIE; 40class DIEBlock; 41class DIEEntry; 42 43class DIEnumerator; 44class DIDescriptor; 45class DIVariable; 46class DIGlobal; 47class DIGlobalVariable; 48class DISubprogram; 49class DIBasicType; 50class DIDerivedType; 51class DIType; 52class DINameSpace; 53class DISubrange; 54class DICompositeType; 55class DITemplateTypeParameter; 56class DITemplateValueParameter; 57 58//===----------------------------------------------------------------------===// 59/// SrcLineInfo - This class is used to record source line correspondence. 60/// 61class SrcLineInfo { 62 unsigned Line; // Source line number. 63 unsigned Column; // Source column. 64 unsigned SourceID; // Source ID number. 65 MCSymbol *Label; // Label in code ID number. 66public: 67 SrcLineInfo(unsigned L, unsigned C, unsigned S, MCSymbol *label) 68 : Line(L), Column(C), SourceID(S), Label(label) {} 69 70 // Accessors 71 unsigned getLine() const { return Line; } 72 unsigned getColumn() const { return Column; } 73 unsigned getSourceID() const { return SourceID; } 74 MCSymbol *getLabel() const { return Label; } 75}; 76 77/// DotDebugLocEntry - This struct describes location entries emitted in 78/// .debug_loc section. 79typedef struct DotDebugLocEntry { 80 const MCSymbol *Begin; 81 const MCSymbol *End; 82 MachineLocation Loc; 83 bool Merged; 84 DotDebugLocEntry() : Begin(0), End(0), Merged(false) {} 85 DotDebugLocEntry(const MCSymbol *B, const MCSymbol *E, MachineLocation &L) 86 : Begin(B), End(E), Loc(L), Merged(false) {} 87 /// Empty entries are also used as a trigger to emit temp label. Such 88 /// labels are referenced is used to find debug_loc offset for a given DIE. 89 bool isEmpty() { return Begin == 0 && End == 0; } 90 bool isMerged() { return Merged; } 91 void Merge(DotDebugLocEntry *Next) { 92 if (!(Begin && Loc == Next->Loc && End == Next->Begin)) 93 return; 94 Next->Begin = Begin; 95 Merged = true; 96 } 97} DotDebugLocEntry; 98 99class DwarfDebug { 100 /// Asm - Target of Dwarf emission. 101 AsmPrinter *Asm; 102 103 /// MMI - Collected machine module information. 104 MachineModuleInfo *MMI; 105 106 //===--------------------------------------------------------------------===// 107 // Attributes used to construct specific Dwarf sections. 108 // 109 110 CompileUnit *FirstCU; 111 DenseMap <const MDNode *, CompileUnit *> CUMap; 112 113 /// AbbreviationsSet - Used to uniquely define abbreviations. 114 /// 115 FoldingSet<DIEAbbrev> AbbreviationsSet; 116 117 /// Abbreviations - A list of all the unique abbreviations in use. 118 /// 119 std::vector<DIEAbbrev *> Abbreviations; 120 121 /// SourceIdMap - Source id map, i.e. pair of directory id and source file 122 /// id mapped to a unique id. 123 StringMap<unsigned> SourceIdMap; 124 125 /// DIEBlocks - A list of all the DIEBlocks in use. 126 std::vector<DIEBlock *> DIEBlocks; 127 128 // DIEValueAllocator - All DIEValues are allocated through this allocator. 129 BumpPtrAllocator DIEValueAllocator; 130 131 /// StringPool - A String->Symbol mapping of strings used by indirect 132 /// references. 133 StringMap<std::pair<MCSymbol*, unsigned> > StringPool; 134 unsigned NextStringPoolNumber; 135 136 MCSymbol *getStringPoolEntry(StringRef Str); 137 138 /// SectionMap - Provides a unique id per text section. 139 /// 140 UniqueVector<const MCSection*> SectionMap; 141 142 /// CurrentFnDbgScope - Top level scope for the current function. 143 /// 144 DbgScope *CurrentFnDbgScope; 145 146 /// CurrentFnArguments - List of Arguments (DbgValues) for current function. 147 SmallVector<DbgVariable *, 8> CurrentFnArguments; 148 149 /// DbgScopeMap - Tracks the scopes in the current function. Owns the 150 /// contained DbgScope*s. 151 /// 152 DenseMap<const MDNode *, DbgScope *> DbgScopeMap; 153 154 /// ConcreteScopes - Tracks the concrete scopees in the current function. 155 /// These scopes are also included in DbgScopeMap. 156 DenseMap<const MDNode *, DbgScope *> ConcreteScopes; 157 158 /// AbstractScopes - Tracks the abstract scopes a module. These scopes are 159 /// not included DbgScopeMap. AbstractScopes owns its DbgScope*s. 160 DenseMap<const MDNode *, DbgScope *> AbstractScopes; 161 162 /// AbstractSPDies - Collection of abstract subprogram DIEs. 163 DenseMap<const MDNode *, DIE *> AbstractSPDies; 164 165 /// AbstractScopesList - Tracks abstract scopes constructed while processing 166 /// a function. This list is cleared during endFunction(). 167 SmallVector<DbgScope *, 4>AbstractScopesList; 168 169 /// AbstractVariables - Collection on abstract variables. Owned by the 170 /// DbgScopes in AbstractScopes. 171 DenseMap<const MDNode *, DbgVariable *> AbstractVariables; 172 173 /// DbgVariableToFrameIndexMap - Tracks frame index used to find 174 /// variable's value. 175 DenseMap<const DbgVariable *, int> DbgVariableToFrameIndexMap; 176 177 /// DbgVariableToDbgInstMap - Maps DbgVariable to corresponding DBG_VALUE 178 /// machine instruction. 179 DenseMap<const DbgVariable *, const MachineInstr *> DbgVariableToDbgInstMap; 180 181 /// DotDebugLocEntries - Collection of DotDebugLocEntry. 182 SmallVector<DotDebugLocEntry, 4> DotDebugLocEntries; 183 184 /// UseDotDebugLocEntry - DW_AT_location attributes for the DIEs in this set 185 /// idetifies corresponding .debug_loc entry offset. 186 SmallPtrSet<const DIE *, 4> UseDotDebugLocEntry; 187 188 /// VarToAbstractVarMap - Maps DbgVariable with corresponding Abstract 189 /// DbgVariable, if any. 190 DenseMap<const DbgVariable *, const DbgVariable *> VarToAbstractVarMap; 191 192 /// InliendSubprogramDIEs - Collection of subprgram DIEs that are marked 193 /// (at the end of the module) as DW_AT_inline. 194 SmallPtrSet<DIE *, 4> InlinedSubprogramDIEs; 195 196 /// ContainingTypeMap - This map is used to keep track of subprogram DIEs that 197 /// need DW_AT_containing_type attribute. This attribute points to a DIE that 198 /// corresponds to the MDNode mapped with the subprogram DIE. 199 DenseMap<DIE *, const MDNode *> ContainingTypeMap; 200 201 typedef SmallVector<DbgScope *, 2> ScopeVector; 202 203 SmallPtrSet<const MachineInstr *, 8> InsnsEndScopeSet; 204 205 /// InlineInfo - Keep track of inlined functions and their location. This 206 /// information is used to populate debug_inlined section. 207 typedef std::pair<const MCSymbol *, DIE *> InlineInfoLabels; 208 DenseMap<const MDNode *, SmallVector<InlineInfoLabels, 4> > InlineInfo; 209 SmallVector<const MDNode *, 4> InlinedSPNodes; 210 211 // ProcessedSPNodes - This is a collection of subprogram MDNodes that 212 // are processed to create DIEs. 213 SmallPtrSet<const MDNode *, 16> ProcessedSPNodes; 214 215 /// LabelsBeforeInsn - Maps instruction with label emitted before 216 /// instruction. 217 DenseMap<const MachineInstr *, MCSymbol *> LabelsBeforeInsn; 218 219 /// LabelsAfterInsn - Maps instruction with label emitted after 220 /// instruction. 221 DenseMap<const MachineInstr *, MCSymbol *> LabelsAfterInsn; 222 223 /// insnNeedsLabel - Collection of instructions that need a label to mark 224 /// a debuggging information entity. 225 SmallPtrSet<const MachineInstr *, 8> InsnNeedsLabel; 226 227 SmallVector<const MCSymbol *, 8> DebugRangeSymbols; 228 229 /// Previous instruction's location information. This is used to determine 230 /// label location to indicate scope boundries in dwarf debug info. 231 DebugLoc PrevInstLoc; 232 MCSymbol *PrevLabel; 233 234 struct FunctionDebugFrameInfo { 235 unsigned Number; 236 std::vector<MachineMove> Moves; 237 238 FunctionDebugFrameInfo(unsigned Num, const std::vector<MachineMove> &M) 239 : Number(Num), Moves(M) {} 240 }; 241 242 std::vector<FunctionDebugFrameInfo> DebugFrames; 243 244 // Section Symbols: these are assembler temporary labels that are emitted at 245 // the beginning of each supported dwarf section. These are used to form 246 // section offsets and are created by EmitSectionLabels. 247 MCSymbol *DwarfFrameSectionSym, *DwarfInfoSectionSym, *DwarfAbbrevSectionSym; 248 MCSymbol *DwarfStrSectionSym, *TextSectionSym, *DwarfDebugRangeSectionSym; 249 MCSymbol *DwarfDebugLocSectionSym; 250 MCSymbol *FunctionBeginSym, *FunctionEndSym; 251 252 DIEInteger *DIEIntegerOne; 253private: 254 255 /// getNumSourceIds - Return the number of unique source ids. 256 unsigned getNumSourceIds() const { 257 return SourceIdMap.size(); 258 } 259 260 /// assignAbbrevNumber - Define a unique number for the abbreviation. 261 /// 262 void assignAbbrevNumber(DIEAbbrev &Abbrev); 263 264 /// createDIEEntry - Creates a new DIEEntry to be a proxy for a debug 265 /// information entry. 266 DIEEntry *createDIEEntry(DIE *Entry); 267 268 /// addUInt - Add an unsigned integer attribute data and value. 269 /// 270 void addUInt(DIE *Die, unsigned Attribute, unsigned Form, uint64_t Integer); 271 272 /// addSInt - Add an signed integer attribute data and value. 273 /// 274 void addSInt(DIE *Die, unsigned Attribute, unsigned Form, int64_t Integer); 275 276 /// addString - Add a string attribute data and value. 277 /// 278 void addString(DIE *Die, unsigned Attribute, unsigned Form, 279 const StringRef Str); 280 281 /// addLabel - Add a Dwarf label attribute data and value. 282 /// 283 void addLabel(DIE *Die, unsigned Attribute, unsigned Form, 284 const MCSymbol *Label); 285 286 /// addDelta - Add a label delta attribute data and value. 287 /// 288 void addDelta(DIE *Die, unsigned Attribute, unsigned Form, 289 const MCSymbol *Hi, const MCSymbol *Lo); 290 291 /// addDIEEntry - Add a DIE attribute data and value. 292 /// 293 void addDIEEntry(DIE *Die, unsigned Attribute, unsigned Form, DIE *Entry); 294 295 /// addBlock - Add block data. 296 /// 297 void addBlock(DIE *Die, unsigned Attribute, unsigned Form, DIEBlock *Block); 298 299 /// addSourceLine - Add location information to specified debug information 300 /// entry. 301 void addSourceLine(DIE *Die, DIVariable V); 302 void addSourceLine(DIE *Die, DIGlobalVariable G); 303 void addSourceLine(DIE *Die, DISubprogram SP); 304 void addSourceLine(DIE *Die, DIType Ty); 305 void addSourceLine(DIE *Die, DINameSpace NS); 306 307 /// addAddress - Add an address attribute to a die based on the location 308 /// provided. 309 void addAddress(DIE *Die, unsigned Attribute, 310 const MachineLocation &Location); 311 312 /// addRegisterAddress - Add register location entry in variable DIE. 313 bool addRegisterAddress(DIE *Die, const MachineOperand &MO); 314 315 /// addConstantValue - Add constant value entry in variable DIE. 316 bool addConstantValue(DIE *Die, const MachineOperand &MO); 317 bool addConstantValue(DIE *Die, ConstantInt *CI, bool Unsigned); 318 319 /// addConstantFPValue - Add constant value entry in variable DIE. 320 bool addConstantFPValue(DIE *Die, const MachineOperand &MO); 321 322 /// addComplexAddress - Start with the address based on the location provided, 323 /// and generate the DWARF information necessary to find the actual variable 324 /// (navigating the extra location information encoded in the type) based on 325 /// the starting location. Add the DWARF information to the die. 326 /// 327 void addComplexAddress(DbgVariable *&DV, DIE *Die, unsigned Attribute, 328 const MachineLocation &Location); 329 330 // FIXME: Should be reformulated in terms of addComplexAddress. 331 /// addBlockByrefAddress - Start with the address based on the location 332 /// provided, and generate the DWARF information necessary to find the 333 /// actual Block variable (navigating the Block struct) based on the 334 /// starting location. Add the DWARF information to the die. Obsolete, 335 /// please use addComplexAddress instead. 336 /// 337 void addBlockByrefAddress(DbgVariable *&DV, DIE *Die, unsigned Attribute, 338 const MachineLocation &Location); 339 340 /// addVariableAddress - Add DW_AT_location attribute for a DbgVariable based 341 /// on provided frame index. 342 void addVariableAddress(DbgVariable *&DV, DIE *Die, int64_t FI); 343 344 /// addToContextOwner - Add Die into the list of its context owner's children. 345 void addToContextOwner(DIE *Die, DIDescriptor Context); 346 347 /// addType - Add a new type attribute to the specified entity. 348 void addType(DIE *Entity, DIType Ty); 349 350 351 /// getOrCreateNameSpace - Create a DIE for DINameSpace. 352 DIE *getOrCreateNameSpace(DINameSpace NS); 353 354 /// getOrCreateTypeDIE - Find existing DIE or create new DIE for the 355 /// given DIType. 356 DIE *getOrCreateTypeDIE(DIType Ty); 357 358 /// getOrCreateTemplateTypeParameterDIE - Find existing DIE or create new DIE 359 /// for the given DITemplateTypeParameter. 360 DIE *getOrCreateTemplateTypeParameterDIE(DITemplateTypeParameter TP); 361 362 /// getOrCreateTemplateValueParameterDIE - Find existing DIE or create new DIE 363 /// for the given DITemplateValueParameter. 364 DIE *getOrCreateTemplateValueParameterDIE(DITemplateValueParameter TVP); 365 366 void addPubTypes(DISubprogram SP); 367 368 /// constructTypeDIE - Construct basic type die from DIBasicType. 369 void constructTypeDIE(DIE &Buffer, 370 DIBasicType BTy); 371 372 /// constructTypeDIE - Construct derived type die from DIDerivedType. 373 void constructTypeDIE(DIE &Buffer, 374 DIDerivedType DTy); 375 376 /// constructTypeDIE - Construct type DIE from DICompositeType. 377 void constructTypeDIE(DIE &Buffer, 378 DICompositeType CTy); 379 380 /// constructSubrangeDIE - Construct subrange DIE from DISubrange. 381 void constructSubrangeDIE(DIE &Buffer, DISubrange SR, DIE *IndexTy); 382 383 /// constructArrayTypeDIE - Construct array type DIE from DICompositeType. 384 void constructArrayTypeDIE(DIE &Buffer, 385 DICompositeType *CTy); 386 387 /// constructEnumTypeDIE - Construct enum type DIE from DIEnumerator. 388 DIE *constructEnumTypeDIE(DIEnumerator ETy); 389 390 /// createMemberDIE - Create new member DIE. 391 DIE *createMemberDIE(DIDerivedType DT); 392 393 /// createSubprogramDIE - Create new DIE using SP. 394 DIE *createSubprogramDIE(DISubprogram SP); 395 396 /// getOrCreateDbgScope - Create DbgScope for the scope. 397 DbgScope *getOrCreateDbgScope(const MDNode *Scope, const MDNode *InlinedAt); 398 399 DbgScope *getOrCreateAbstractScope(const MDNode *N); 400 401 /// findAbstractVariable - Find abstract variable associated with Var. 402 DbgVariable *findAbstractVariable(DIVariable &Var, DebugLoc Loc); 403 404 /// updateSubprogramScopeDIE - Find DIE for the given subprogram and 405 /// attach appropriate DW_AT_low_pc and DW_AT_high_pc attributes. 406 /// If there are global variables in this scope then create and insert 407 /// DIEs for these variables. 408 DIE *updateSubprogramScopeDIE(const MDNode *SPNode); 409 410 /// constructLexicalScope - Construct new DW_TAG_lexical_block 411 /// for this scope and attach DW_AT_low_pc/DW_AT_high_pc labels. 412 DIE *constructLexicalScopeDIE(DbgScope *Scope); 413 414 /// constructInlinedScopeDIE - This scope represents inlined body of 415 /// a function. Construct DIE to represent this concrete inlined copy 416 /// of the function. 417 DIE *constructInlinedScopeDIE(DbgScope *Scope); 418 419 /// constructVariableDIE - Construct a DIE for the given DbgVariable. 420 DIE *constructVariableDIE(DbgVariable *DV, DbgScope *S); 421 422 /// constructScopeDIE - Construct a DIE for this scope. 423 DIE *constructScopeDIE(DbgScope *Scope); 424 425 /// EmitSectionLabels - Emit initial Dwarf sections with a label at 426 /// the start of each one. 427 void EmitSectionLabels(); 428 429 /// emitDIE - Recusively Emits a debug information entry. 430 /// 431 void emitDIE(DIE *Die); 432 433 /// computeSizeAndOffset - Compute the size and offset of a DIE. 434 /// 435 unsigned computeSizeAndOffset(DIE *Die, unsigned Offset, bool Last); 436 437 /// computeSizeAndOffsets - Compute the size and offset of all the DIEs. 438 /// 439 void computeSizeAndOffsets(); 440 441 /// EmitDebugInfo - Emit the debug info section. 442 /// 443 void emitDebugInfo(); 444 445 /// emitAbbreviations - Emit the abbreviation section. 446 /// 447 void emitAbbreviations() const; 448 449 /// emitEndOfLineMatrix - Emit the last address of the section and the end of 450 /// the line matrix. 451 /// 452 void emitEndOfLineMatrix(unsigned SectionEnd); 453 454 /// emitCommonDebugFrame - Emit common frame info into a debug frame section. 455 /// 456 void emitCommonDebugFrame(); 457 458 /// emitFunctionDebugFrame - Emit per function frame info into a debug frame 459 /// section. 460 void emitFunctionDebugFrame(const FunctionDebugFrameInfo &DebugFrameInfo); 461 462 /// emitDebugPubNames - Emit visible names into a debug pubnames section. 463 /// 464 void emitDebugPubNames(); 465 466 /// emitDebugPubTypes - Emit visible types into a debug pubtypes section. 467 /// 468 void emitDebugPubTypes(); 469 470 /// emitDebugStr - Emit visible names into a debug str section. 471 /// 472 void emitDebugStr(); 473 474 /// emitDebugLoc - Emit visible names into a debug loc section. 475 /// 476 void emitDebugLoc(); 477 478 /// EmitDebugARanges - Emit visible names into a debug aranges section. 479 /// 480 void EmitDebugARanges(); 481 482 /// emitDebugRanges - Emit visible names into a debug ranges section. 483 /// 484 void emitDebugRanges(); 485 486 /// emitDebugMacInfo - Emit visible names into a debug macinfo section. 487 /// 488 void emitDebugMacInfo(); 489 490 /// emitDebugInlineInfo - Emit inline info using following format. 491 /// Section Header: 492 /// 1. length of section 493 /// 2. Dwarf version number 494 /// 3. address size. 495 /// 496 /// Entries (one "entry" for each function that was inlined): 497 /// 498 /// 1. offset into __debug_str section for MIPS linkage name, if exists; 499 /// otherwise offset into __debug_str for regular function name. 500 /// 2. offset into __debug_str section for regular function name. 501 /// 3. an unsigned LEB128 number indicating the number of distinct inlining 502 /// instances for the function. 503 /// 504 /// The rest of the entry consists of a {die_offset, low_pc} pair for each 505 /// inlined instance; the die_offset points to the inlined_subroutine die in 506 /// the __debug_info section, and the low_pc is the starting address for the 507 /// inlining instance. 508 void emitDebugInlineInfo(); 509 510 /// GetOrCreateSourceID - Look up the source id with the given directory and 511 /// source file names. If none currently exists, create a new id and insert it 512 /// in the SourceIds map. 513 unsigned GetOrCreateSourceID(StringRef FullName); 514 515 /// constructCompileUnit - Create new CompileUnit for the given 516 /// metadata node with tag DW_TAG_compile_unit. 517 void constructCompileUnit(const MDNode *N); 518 519 /// getCompielUnit - Get CompileUnit DIE. 520 CompileUnit *getCompileUnit(const MDNode *N) const; 521 522 /// constructGlobalVariableDIE - Construct global variable DIE. 523 void constructGlobalVariableDIE(const MDNode *N); 524 525 /// construct SubprogramDIE - Construct subprogram DIE. 526 void constructSubprogramDIE(const MDNode *N); 527 528 /// recordSourceLine - Register a source line with debug info. Returns the 529 /// unique label that was emitted and which provides correspondence to 530 /// the source line list. 531 MCSymbol *recordSourceLine(unsigned Line, unsigned Col, const MDNode *Scope); 532 533 /// recordVariableFrameIndex - Record a variable's index. 534 void recordVariableFrameIndex(const DbgVariable *V, int Index); 535 536 /// findVariableFrameIndex - Return true if frame index for the variable 537 /// is found. Update FI to hold value of the index. 538 bool findVariableFrameIndex(const DbgVariable *V, int *FI); 539 540 /// findDbgScope - Find DbgScope for the debug loc attached with an 541 /// instruction. 542 DbgScope *findDbgScope(const MachineInstr *MI); 543 544 /// identifyScopeMarkers() - Indentify instructions that are marking 545 /// beginning of or end of a scope. 546 void identifyScopeMarkers(); 547 548 /// extractScopeInformation - Scan machine instructions in this function 549 /// and collect DbgScopes. Return true, if atleast one scope was found. 550 bool extractScopeInformation(); 551 552 /// addCurrentFnArgument - If Var is an current function argument that add 553 /// it in CurrentFnArguments list. 554 bool addCurrentFnArgument(const MachineFunction *MF, 555 DbgVariable *Var, DbgScope *Scope); 556 557 /// collectVariableInfo - Populate DbgScope entries with variables' info. 558 void collectVariableInfo(const MachineFunction *, 559 SmallPtrSet<const MDNode *, 16> &ProcessedVars); 560 561 /// collectVariableInfoFromMMITable - Collect variable information from 562 /// side table maintained by MMI. 563 void collectVariableInfoFromMMITable(const MachineFunction * MF, 564 SmallPtrSet<const MDNode *, 16> &P); 565public: 566 //===--------------------------------------------------------------------===// 567 // Main entry points. 568 // 569 DwarfDebug(AsmPrinter *A, Module *M); 570 ~DwarfDebug(); 571 572 /// beginModule - Emit all Dwarf sections that should come prior to the 573 /// content. 574 void beginModule(Module *M); 575 576 /// endModule - Emit all Dwarf sections that should come after the content. 577 /// 578 void endModule(); 579 580 /// beginFunction - Gather pre-function debug information. Assumes being 581 /// emitted immediately after the function entry point. 582 void beginFunction(const MachineFunction *MF); 583 584 /// endFunction - Gather and emit post-function debug information. 585 /// 586 void endFunction(const MachineFunction *MF); 587 588 /// getLabelBeforeInsn - Return Label preceding the instruction. 589 const MCSymbol *getLabelBeforeInsn(const MachineInstr *MI); 590 591 /// getLabelAfterInsn - Return Label immediately following the instruction. 592 const MCSymbol *getLabelAfterInsn(const MachineInstr *MI); 593 594 /// beginInstruction - Process beginning of an instruction. 595 void beginInstruction(const MachineInstr *MI); 596 597 /// endInstruction - Prcess end of an instruction. 598 void endInstruction(const MachineInstr *MI); 599}; 600} // End of namespace llvm 601 602#endif 603