Add debug info utility routines.
[oota-llvm.git] / include / llvm / Analysis / DebugInfo.h
1 //===--- llvm/Analysis/DebugInfo.h - Debug Information Helpers --*- 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 defines a bunch of datatypes that are useful for creating and
11 // walking debug info in LLVM IR form. They essentially provide wrappers around
12 // the information in the global variables that's needed when constructing the
13 // DWARF information.
14 //
15 //===----------------------------------------------------------------------===//
16
17 #ifndef LLVM_ANALYSIS_DEBUGINFO_H
18 #define LLVM_ANALYSIS_DEBUGINFO_H
19
20 #include "llvm/Target/TargetMachine.h"
21 #include "llvm/ADT/StringMap.h"
22 #include "llvm/ADT/DenseMap.h"
23 #include "llvm/ADT/SmallVector.h"
24 #include "llvm/Support/Dwarf.h"
25
26 namespace llvm {
27   class BasicBlock;
28   class Constant;
29   class Function;
30   class GlobalVariable;
31   class Module;
32   class Type;
33   class Value;
34   struct DbgStopPointInst;
35   struct DbgDeclareInst;
36   struct DbgFuncStartInst;
37   struct DbgRegionStartInst;
38   struct DbgRegionEndInst;
39   class DebugLoc;
40   class DebugLocTracker;
41   class Instruction;
42
43   class DIDescriptor {
44   protected:    
45     GlobalVariable *DbgGV;
46
47     /// DIDescriptor constructor.  If the specified GV is non-null, this checks
48     /// to make sure that the tag in the descriptor matches 'RequiredTag'.  If
49     /// not, the debug info is corrupt and we ignore it.
50     DIDescriptor(GlobalVariable *GV, unsigned RequiredTag);
51
52     const std::string &getStringField(unsigned Elt, std::string &Result) const;
53     unsigned getUnsignedField(unsigned Elt) const {
54       return (unsigned)getUInt64Field(Elt);
55     }
56     uint64_t getUInt64Field(unsigned Elt) const;
57     DIDescriptor getDescriptorField(unsigned Elt) const;
58
59     template <typename DescTy>
60     DescTy getFieldAs(unsigned Elt) const {
61       return DescTy(getDescriptorField(Elt).getGV());
62     }
63
64     GlobalVariable *getGlobalVariableField(unsigned Elt) const;
65
66   public:
67     explicit DIDescriptor() : DbgGV(0) {}
68     explicit DIDescriptor(GlobalVariable *GV) : DbgGV(GV) {}
69
70     bool isNull() const { return DbgGV == 0; }
71
72     GlobalVariable *getGV() const { return DbgGV; }
73
74     unsigned getVersion() const {
75       return getUnsignedField(0) & LLVMDebugVersionMask;
76     }
77
78     unsigned getTag() const {
79       return getUnsignedField(0) & ~LLVMDebugVersionMask;
80     }
81
82     /// ValidDebugInfo - Return true if V represents valid debug info value.
83     static bool ValidDebugInfo(Value *V, CodeGenOpt::Level OptLevel);
84
85     /// dump - print descriptor.
86     void dump() const;
87   };
88
89   /// DISubrange - This is used to represent ranges, for array bounds.
90   class DISubrange : public DIDescriptor {
91   public:
92     explicit DISubrange(GlobalVariable *GV = 0)
93       : DIDescriptor(GV, dwarf::DW_TAG_subrange_type) {}
94
95     int64_t getLo() const { return (int64_t)getUInt64Field(1); }
96     int64_t getHi() const { return (int64_t)getUInt64Field(2); }
97   };
98
99   /// DIArray - This descriptor holds an array of descriptors.
100   class DIArray : public DIDescriptor {
101   public:
102     explicit DIArray(GlobalVariable *GV = 0) : DIDescriptor(GV) {}
103
104     unsigned getNumElements() const;
105     DIDescriptor getElement(unsigned Idx) const {
106       return getDescriptorField(Idx);
107     }
108   };
109
110   /// DICompileUnit - A wrapper for a compile unit.
111   class DICompileUnit : public DIDescriptor {
112   public:
113     explicit DICompileUnit(GlobalVariable *GV = 0)
114       : DIDescriptor(GV, dwarf::DW_TAG_compile_unit) {}
115
116     unsigned getLanguage() const     { return getUnsignedField(2); }
117     const std::string &getFilename(std::string &F) const {
118       return getStringField(3, F);
119     }
120     const std::string &getDirectory(std::string &F) const {
121       return getStringField(4, F);
122     }
123     const std::string &getProducer(std::string &F) const {
124       return getStringField(5, F);
125     }
126     
127     /// isMain - Each input file is encoded as a separate compile unit in LLVM
128     /// debugging information output. However, many target specific tool chains
129     /// prefer to encode only one compile unit in an object file. In this 
130     /// situation, the LLVM code generator will include  debugging information
131     /// entities in the compile unit that is marked as main compile unit. The 
132     /// code generator accepts maximum one main compile unit per module. If a
133     /// module does not contain any main compile unit then the code generator 
134     /// will emit multiple compile units in the output object file.
135
136     bool isMain() const                { return getUnsignedField(6); }
137     bool isOptimized() const           { return getUnsignedField(7); }
138     const std::string &getFlags(std::string &F) const {
139       return getStringField(8, F);
140     }
141     unsigned getRunTimeVersion() const { return getUnsignedField(9); }
142
143     /// Verify - Verify that a compile unit is well formed.
144     bool Verify() const;
145
146     /// dump - print compile unit.
147     void dump() const;
148   };
149
150   /// DIEnumerator - A wrapper for an enumerator (e.g. X and Y in 'enum {X,Y}').
151   /// FIXME: it seems strange that this doesn't have either a reference to the
152   /// type/precision or a file/line pair for location info.
153   class DIEnumerator : public DIDescriptor {
154   public:
155     explicit DIEnumerator(GlobalVariable *GV = 0)
156       : DIDescriptor(GV, dwarf::DW_TAG_enumerator) {}
157
158     const std::string &getName(std::string &F) const {
159       return getStringField(1, F);
160     }
161     uint64_t getEnumValue() const { return getUInt64Field(2); }
162   };
163
164   /// DIType - This is a wrapper for a type.
165   /// FIXME: Types should be factored much better so that CV qualifiers and
166   /// others do not require a huge and empty descriptor full of zeros.
167   class DIType : public DIDescriptor {
168   public:
169     enum {
170       FlagPrivate   = 1 << 0,
171       FlagProtected = 1 << 1,
172       FlagFwdDecl   = 1 << 2
173     };
174
175   protected:
176     DIType(GlobalVariable *GV, unsigned Tag) : DIDescriptor(GV, Tag) {}
177     // This ctor is used when the Tag has already been validated by a derived
178     // ctor.
179     DIType(GlobalVariable *GV, bool, bool) : DIDescriptor(GV) {}
180
181   public:
182     /// isDerivedType - Return true if the specified tag is legal for
183     /// DIDerivedType.
184     static bool isDerivedType(unsigned TAG);
185
186     /// isCompositeType - Return true if the specified tag is legal for
187     /// DICompositeType.
188     static bool isCompositeType(unsigned TAG);
189
190     /// isBasicType - Return true if the specified tag is legal for
191     /// DIBasicType.
192     static bool isBasicType(unsigned TAG) {
193       return TAG == dwarf::DW_TAG_base_type;
194     }
195
196     /// Verify - Verify that a type descriptor is well formed.
197     bool Verify() const;
198   public:
199     explicit DIType(GlobalVariable *GV);
200     explicit DIType() {}
201     virtual ~DIType() {}
202
203     DIDescriptor getContext() const     { return getDescriptorField(1); }
204     const std::string &getName(std::string &F) const {
205       return getStringField(2, F);
206     }
207     DICompileUnit getCompileUnit() const{ return getFieldAs<DICompileUnit>(3); }
208     unsigned getLineNumber() const      { return getUnsignedField(4); }
209     uint64_t getSizeInBits() const      { return getUInt64Field(5); }
210     uint64_t getAlignInBits() const     { return getUInt64Field(6); }
211     // FIXME: Offset is only used for DW_TAG_member nodes.  Making every type
212     // carry this is just plain insane.
213     uint64_t getOffsetInBits() const    { return getUInt64Field(7); }
214     unsigned getFlags() const           { return getUnsignedField(8); }
215     bool isPrivate() const              { return (getFlags() & FlagPrivate) != 0; }
216     bool isProtected() const            { return (getFlags() & FlagProtected) != 0; }
217     bool isForwardDecl() const          { return (getFlags() & FlagFwdDecl) != 0; }
218
219     /// dump - print type.
220     void dump() const;
221   };
222
223   /// DIBasicType - A basic type, like 'int' or 'float'.
224   class DIBasicType : public DIType {
225   public:
226     explicit DIBasicType(GlobalVariable *GV)
227       : DIType(GV, dwarf::DW_TAG_base_type) {}
228
229     unsigned getEncoding() const { return getUnsignedField(9); }
230
231     /// dump - print basic type.
232     void dump() const;
233   };
234
235   /// DIDerivedType - A simple derived type, like a const qualified type,
236   /// a typedef, a pointer or reference, etc.
237   class DIDerivedType : public DIType {
238   protected:
239     explicit DIDerivedType(GlobalVariable *GV, bool, bool)
240       : DIType(GV, true, true) {}
241   public:
242     explicit DIDerivedType(GlobalVariable *GV)
243       : DIType(GV, true, true) {
244       if (GV && !isDerivedType(getTag()))
245         DbgGV = 0;
246     }
247
248     DIType getTypeDerivedFrom() const { return getFieldAs<DIType>(9); }
249
250     /// getOriginalTypeSize - If this type is derived from a base type then
251     /// return base type size.
252     uint64_t getOriginalTypeSize() const;
253     /// dump - print derived type.
254     void dump() const;
255   };
256
257   /// DICompositeType - This descriptor holds a type that can refer to multiple
258   /// other types, like a function or struct.
259   /// FIXME: Why is this a DIDerivedType??
260   class DICompositeType : public DIDerivedType {
261   public:
262     explicit DICompositeType(GlobalVariable *GV)
263       : DIDerivedType(GV, true, true) {
264       if (GV && !isCompositeType(getTag()))
265         DbgGV = 0;
266     }
267
268     DIArray getTypeArray() const { return getFieldAs<DIArray>(10); }
269     unsigned getRunTimeLang() const { return getUnsignedField(11); }
270
271     /// Verify - Verify that a composite type descriptor is well formed.
272     bool Verify() const;
273
274     /// dump - print composite type.
275     void dump() const;
276   };
277
278   /// DIGlobal - This is a common class for global variables and subprograms.
279   class DIGlobal : public DIDescriptor {
280   protected:
281     explicit DIGlobal(GlobalVariable *GV, unsigned RequiredTag)
282       : DIDescriptor(GV, RequiredTag) {}
283
284     /// isSubprogram - Return true if the specified tag is legal for
285     /// DISubprogram.
286     static bool isSubprogram(unsigned TAG) {
287       return TAG == dwarf::DW_TAG_subprogram;
288     }
289
290     /// isGlobalVariable - Return true if the specified tag is legal for
291     /// DIGlobalVariable.
292     static bool isGlobalVariable(unsigned TAG) {
293       return TAG == dwarf::DW_TAG_variable;
294     }
295
296   public:
297     virtual ~DIGlobal() {}
298
299     DIDescriptor getContext() const     { return getDescriptorField(2); }
300     const std::string &getName(std::string &F) const {
301       return getStringField(3, F);
302     }
303     const std::string &getDisplayName(std::string &F) const {
304       return getStringField(4, F);
305     }
306     const std::string &getLinkageName(std::string &F) const {
307       return getStringField(5, F);
308     }
309     DICompileUnit getCompileUnit() const{ return getFieldAs<DICompileUnit>(6); }
310     unsigned getLineNumber() const      { return getUnsignedField(7); }
311     DIType getType() const              { return getFieldAs<DIType>(8); }
312
313     /// isLocalToUnit - Return true if this subprogram is local to the current
314     /// compile unit, like 'static' in C.
315     unsigned isLocalToUnit() const      { return getUnsignedField(9); }
316     unsigned isDefinition() const       { return getUnsignedField(10); }
317
318     /// dump - print global.
319     void dump() const;
320   };
321
322   /// DISubprogram - This is a wrapper for a subprogram (e.g. a function).
323   class DISubprogram : public DIGlobal {
324   public:
325     explicit DISubprogram(GlobalVariable *GV = 0)
326       : DIGlobal(GV, dwarf::DW_TAG_subprogram) {}
327
328     DICompositeType getType() const { return getFieldAs<DICompositeType>(8); }
329
330     /// getReturnTypeName - Subprogram return types are encoded either as
331     /// DIType or as DICompositeType.
332     const std::string &getReturnTypeName(std::string &F) const {
333       DICompositeType DCT(getFieldAs<DICompositeType>(8));
334       if (!DCT.isNull()) {
335         DIArray A = DCT.getTypeArray();
336         DIType T(A.getElement(0).getGV());
337         return T.getName(F);
338       }
339       DIType T(getFieldAs<DIType>(8));
340       return T.getName(F);
341     }
342
343     /// Verify - Verify that a subprogram descriptor is well formed.
344     bool Verify() const;
345
346     /// dump - print subprogram.
347     void dump() const;
348
349     /// describes - Return true if this subprogram provides debugging
350     /// information for the function F.
351     bool describes(const Function *F);
352   };
353
354   /// DIGlobalVariable - This is a wrapper for a global variable.
355   class DIGlobalVariable : public DIGlobal {
356   public:
357     explicit DIGlobalVariable(GlobalVariable *GV = 0)
358       : DIGlobal(GV, dwarf::DW_TAG_variable) {}
359
360     GlobalVariable *getGlobal() const { return getGlobalVariableField(11); }
361
362     /// Verify - Verify that a global variable descriptor is well formed.
363     bool Verify() const;
364
365     /// dump - print global variable.
366     void dump() const;
367   };
368
369   /// DIVariable - This is a wrapper for a variable (e.g. parameter, local,
370   /// global etc).
371   class DIVariable : public DIDescriptor {
372   public:
373     explicit DIVariable(GlobalVariable *GV = 0)
374       : DIDescriptor(GV) {
375       if (GV && !isVariable(getTag()))
376         DbgGV = 0;
377     }
378
379     DIDescriptor getContext() const { return getDescriptorField(1); }
380     const std::string &getName(std::string &F) const {
381       return getStringField(2, F);
382     }
383     DICompileUnit getCompileUnit() const{ return getFieldAs<DICompileUnit>(3); }
384     unsigned getLineNumber() const      { return getUnsignedField(4); }
385     DIType getType() const              { return getFieldAs<DIType>(5); }
386
387     /// isVariable - Return true if the specified tag is legal for DIVariable.
388     static bool isVariable(unsigned Tag);
389
390     /// Verify - Verify that a variable descriptor is well formed.
391     bool Verify() const;
392
393     /// dump - print variable.
394     void dump() const;
395   };
396
397   /// DIBlock - This is a wrapper for a block (e.g. a function, scope, etc).
398   class DIBlock : public DIDescriptor {
399   public:
400     explicit DIBlock(GlobalVariable *GV = 0)
401       : DIDescriptor(GV, dwarf::DW_TAG_lexical_block) {}
402
403     DIDescriptor getContext() const { return getDescriptorField(1); }
404   };
405
406   /// DIFactory - This object assists with the construction of the various
407   /// descriptors.
408   class DIFactory {
409     Module &M;
410     // Cached values for uniquing and faster lookups.
411     const Type *EmptyStructPtr; // "{}*".
412     Function *StopPointFn;   // llvm.dbg.stoppoint
413     Function *FuncStartFn;   // llvm.dbg.func.start
414     Function *RegionStartFn; // llvm.dbg.region.start
415     Function *RegionEndFn;   // llvm.dbg.region.end
416     Function *DeclareFn;     // llvm.dbg.declare
417     StringMap<Constant*> StringCache;
418     DenseMap<Constant*, DIDescriptor> SimpleConstantCache;
419
420     DIFactory(const DIFactory &);     // DO NOT IMPLEMENT
421     void operator=(const DIFactory&); // DO NOT IMPLEMENT
422   public:
423     explicit DIFactory(Module &m);
424
425     /// GetOrCreateArray - Create an descriptor for an array of descriptors. 
426     /// This implicitly uniques the arrays created.
427     DIArray GetOrCreateArray(DIDescriptor *Tys, unsigned NumTys);
428
429     /// GetOrCreateSubrange - Create a descriptor for a value range.  This
430     /// implicitly uniques the values returned.
431     DISubrange GetOrCreateSubrange(int64_t Lo, int64_t Hi);
432
433     /// CreateCompileUnit - Create a new descriptor for the specified compile
434     /// unit.
435     DICompileUnit CreateCompileUnit(unsigned LangID,
436                                     const std::string &Filename,
437                                     const std::string &Directory,
438                                     const std::string &Producer,
439                                     bool isMain = false,
440                                     bool isOptimized = false,
441                                     const char *Flags = "",
442                                     unsigned RunTimeVer = 0);
443
444     /// CreateEnumerator - Create a single enumerator value.
445     DIEnumerator CreateEnumerator(const std::string &Name, uint64_t Val);
446
447     /// CreateBasicType - Create a basic type like int, float, etc.
448     DIBasicType CreateBasicType(DIDescriptor Context, const std::string &Name,
449                                 DICompileUnit CompileUnit, unsigned LineNumber,
450                                 uint64_t SizeInBits, uint64_t AlignInBits,
451                                 uint64_t OffsetInBits, unsigned Flags,
452                                 unsigned Encoding);
453
454     /// CreateDerivedType - Create a derived type like const qualified type,
455     /// pointer, typedef, etc.
456     DIDerivedType CreateDerivedType(unsigned Tag, DIDescriptor Context,
457                                     const std::string &Name,
458                                     DICompileUnit CompileUnit,
459                                     unsigned LineNumber,
460                                     uint64_t SizeInBits, uint64_t AlignInBits,
461                                     uint64_t OffsetInBits, unsigned Flags,
462                                     DIType DerivedFrom);
463
464     /// CreateCompositeType - Create a composite type like array, struct, etc.
465     DICompositeType CreateCompositeType(unsigned Tag, DIDescriptor Context,
466                                         const std::string &Name,
467                                         DICompileUnit CompileUnit,
468                                         unsigned LineNumber,
469                                         uint64_t SizeInBits,
470                                         uint64_t AlignInBits,
471                                         uint64_t OffsetInBits, unsigned Flags,
472                                         DIType DerivedFrom,
473                                         DIArray Elements,
474                                         unsigned RunTimeLang = 0);
475
476     /// CreateSubprogram - Create a new descriptor for the specified subprogram.
477     /// See comments in DISubprogram for descriptions of these fields.
478     DISubprogram CreateSubprogram(DIDescriptor Context, const std::string &Name,
479                                   const std::string &DisplayName,
480                                   const std::string &LinkageName,
481                                   DICompileUnit CompileUnit, unsigned LineNo,
482                                   DIType Type, bool isLocalToUnit,
483                                   bool isDefinition);
484
485     /// CreateGlobalVariable - Create a new descriptor for the specified global.
486     DIGlobalVariable
487     CreateGlobalVariable(DIDescriptor Context, const std::string &Name,
488                          const std::string &DisplayName,
489                          const std::string &LinkageName, 
490                          DICompileUnit CompileUnit,
491                          unsigned LineNo, DIType Type, bool isLocalToUnit,
492                          bool isDefinition, llvm::GlobalVariable *GV);
493
494     /// CreateVariable - Create a new descriptor for the specified variable.
495     DIVariable CreateVariable(unsigned Tag, DIDescriptor Context,
496                               const std::string &Name,
497                               DICompileUnit CompileUnit, unsigned LineNo,
498                               DIType Type);
499
500     /// CreateBlock - This creates a descriptor for a lexical block with the
501     /// specified parent context.
502     DIBlock CreateBlock(DIDescriptor Context);
503
504     /// InsertStopPoint - Create a new llvm.dbg.stoppoint intrinsic invocation,
505     /// inserting it at the end of the specified basic block.
506     void InsertStopPoint(DICompileUnit CU, unsigned LineNo, unsigned ColNo,
507                          BasicBlock *BB);
508
509     /// InsertSubprogramStart - Create a new llvm.dbg.func.start intrinsic to
510     /// mark the start of the specified subprogram.
511     void InsertSubprogramStart(DISubprogram SP, BasicBlock *BB);
512
513     /// InsertRegionStart - Insert a new llvm.dbg.region.start intrinsic call to
514     /// mark the start of a region for the specified scoping descriptor.
515     void InsertRegionStart(DIDescriptor D, BasicBlock *BB);
516
517     /// InsertRegionEnd - Insert a new llvm.dbg.region.end intrinsic call to
518     /// mark the end of a region for the specified scoping descriptor.
519     void InsertRegionEnd(DIDescriptor D, BasicBlock *BB);
520
521     /// InsertDeclare - Insert a new llvm.dbg.declare intrinsic call.
522     void InsertDeclare(llvm::Value *Storage, DIVariable D, BasicBlock *BB);
523
524   private:
525     Constant *GetTagConstant(unsigned TAG);
526     Constant *GetStringConstant(const std::string &String);
527
528     /// getCastToEmpty - Return the descriptor as a Constant* with type '{}*'.
529     Constant *getCastToEmpty(DIDescriptor D);
530   };
531
532   /// Finds the stoppoint coressponding to this instruction, that is the
533   /// stoppoint that dominates this instruction 
534   const DbgStopPointInst *findStopPoint(const Instruction *Inst);
535
536   /// Finds the stoppoint corresponding to first real (non-debug intrinsic) 
537   /// instruction in this Basic Block, and returns the stoppoint for it.
538   const DbgStopPointInst *findBBStopPoint(const BasicBlock *BB);
539
540   /// Finds the dbg.declare intrinsic corresponding to this value if any.
541   /// It looks through pointer casts too.
542   const DbgDeclareInst *findDbgDeclare(const Value *V, bool stripCasts = true);
543
544   /// Find the debug info descriptor corresponding to this global variable.
545   Value *findDbgGlobalDeclare(GlobalVariable *V);
546
547   bool getLocationInfo(const Value *V, std::string &DisplayName, std::string &Type, 
548                        unsigned &LineNo, std::string &File, std::string &Dir); 
549
550   /// CollectDebugInfoAnchors - Collect debugging information anchors.
551   void CollectDebugInfoAnchors(Module &M,
552                                SmallVector<GlobalVariable *, 2> &CompileUnits,
553                                SmallVector<GlobalVariable *, 4> &GlobalVars,
554                                SmallVector<GlobalVariable *, 4> &Subprograms);
555
556   /// isValidDebugInfoIntrinsic - Return true if SPI is a valid debug 
557   /// info intrisic.
558   bool isValidDebugInfoIntrinsic(DbgStopPointInst &SPI, 
559                                  CodeGenOpt::Level OptLev);
560
561   /// isValidDebugInfoIntrinsic - Return true if FSI is a valid debug 
562   /// info intrisic.
563   bool isValidDebugInfoIntrinsic(DbgFuncStartInst &FSI,
564                                  CodeGenOpt::Level OptLev);
565
566   /// isValidDebugInfoIntrinsic - Return true if RSI is a valid debug 
567   /// info intrisic.
568   bool isValidDebugInfoIntrinsic(DbgRegionStartInst &RSI,
569                                  CodeGenOpt::Level OptLev);
570
571   /// isValidDebugInfoIntrinsic - Return true if REI is a valid debug 
572   /// info intrisic.
573   bool isValidDebugInfoIntrinsic(DbgRegionEndInst &REI,
574                                  CodeGenOpt::Level OptLev);
575
576   /// isValidDebugInfoIntrinsic - Return true if DI is a valid debug 
577   /// info intrisic.
578   bool isValidDebugInfoIntrinsic(DbgDeclareInst &DI,
579                                  CodeGenOpt::Level OptLev);
580
581   /// ExtractDebugLocation - Extract debug location information 
582   /// from llvm.dbg.stoppoint intrinsic.
583   DebugLoc ExtractDebugLocation(DbgStopPointInst &SPI,
584                                 CodeGenOpt::Level OptLev,
585                                 DebugLocTracker &DebugLocInfo);
586
587   /// ExtractDebugLocation - Extract debug location information 
588   /// from llvm.dbg.func_start intrinsic.
589   DebugLoc ExtractDebugLocation(DbgFuncStartInst &FSI,
590                                 CodeGenOpt::Level OptLev,
591                                 DebugLocTracker &DebugLocInfo);
592
593   /// isInlinedFnStart - Return true if FSI is starting an inlined function.
594   bool isInlinedFnStart(DbgFuncStartInst &FSI, const Function *CurrentFn);
595
596   /// isInlinedFnEnd - Return true if REI is ending an inlined function.
597   bool isInlinedFnEnd(DbgRegionEndInst &REI, const Function *CurrentFn);
598
599 } // end namespace llvm
600
601 #endif