2008-10-31 11:54:29 +08:00
|
|
|
//===--- CGDebugInfo.h - DebugInfo for LLVM CodeGen -------------*- C++ -*-===//
|
2008-05-08 16:54:20 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2009-09-09 23:08:12 +08:00
|
|
|
// This is the source level debug info generator for llvm translation.
|
2008-05-08 16:54:20 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef CLANG_CODEGEN_CGDEBUGINFO_H
|
|
|
|
#define CLANG_CODEGEN_CGDEBUGINFO_H
|
|
|
|
|
2008-05-25 13:15:42 +08:00
|
|
|
#include "clang/AST/Type.h"
|
2009-09-30 10:43:10 +08:00
|
|
|
#include "clang/AST/Expr.h"
|
2008-05-08 16:54:20 +08:00
|
|
|
#include "clang/Basic/SourceLocation.h"
|
2008-11-10 14:08:34 +08:00
|
|
|
#include "llvm/ADT/DenseMap.h"
|
|
|
|
#include "llvm/Analysis/DebugInfo.h"
|
2010-12-09 06:42:58 +08:00
|
|
|
#include "llvm/Analysis/DIBuilder.h"
|
2009-09-20 03:27:24 +08:00
|
|
|
#include "llvm/Support/ValueHandle.h"
|
2010-01-14 08:36:21 +08:00
|
|
|
#include "llvm/Support/Allocator.h"
|
2008-05-08 16:54:20 +08:00
|
|
|
|
2008-11-01 09:53:16 +08:00
|
|
|
#include "CGBuilder.h"
|
2008-05-08 16:54:20 +08:00
|
|
|
|
2009-09-20 03:27:24 +08:00
|
|
|
namespace llvm {
|
|
|
|
class MDNode;
|
|
|
|
}
|
|
|
|
|
2008-05-08 16:54:20 +08:00
|
|
|
namespace clang {
|
2008-05-30 18:30:31 +08:00
|
|
|
class VarDecl;
|
2009-02-27 05:10:26 +08:00
|
|
|
class ObjCInterfaceDecl;
|
2011-04-06 01:30:54 +08:00
|
|
|
class ClassTemplateSpecializationDecl;
|
2011-06-14 12:02:39 +08:00
|
|
|
class GlobalDecl;
|
2008-11-01 09:53:16 +08:00
|
|
|
|
2008-05-08 16:54:20 +08:00
|
|
|
namespace CodeGen {
|
|
|
|
class CodeGenModule;
|
2009-09-30 10:43:10 +08:00
|
|
|
class CodeGenFunction;
|
2011-02-07 18:33:21 +08:00
|
|
|
class CGBlockInfo;
|
2008-05-08 16:54:20 +08:00
|
|
|
|
2009-09-09 23:08:12 +08:00
|
|
|
/// CGDebugInfo - This class gathers all debug information during compilation
|
|
|
|
/// and is responsible for emitting to llvm globals or pass directly to
|
2008-05-25 13:15:42 +08:00
|
|
|
/// the backend.
|
2008-05-08 16:54:20 +08:00
|
|
|
class CGDebugInfo {
|
2009-12-07 02:00:51 +08:00
|
|
|
CodeGenModule &CGM;
|
2010-12-09 06:42:58 +08:00
|
|
|
llvm::DIBuilder DBuilder;
|
2010-03-09 08:44:50 +08:00
|
|
|
llvm::DICompileUnit TheCU;
|
2008-11-10 14:08:34 +08:00
|
|
|
SourceLocation CurLoc, PrevLoc;
|
2010-01-29 02:11:52 +08:00
|
|
|
llvm::DIType VTablePtrType;
|
2010-03-09 08:44:50 +08:00
|
|
|
|
2008-05-25 13:15:42 +08:00
|
|
|
/// TypeCache - Cache of previously constructed Types.
|
2010-03-30 02:29:57 +08:00
|
|
|
llvm::DenseMap<void *, llvm::WeakVH> TypeCache;
|
2009-09-09 23:08:12 +08:00
|
|
|
|
2009-05-14 10:03:51 +08:00
|
|
|
bool BlockLiteralGenericSet;
|
|
|
|
llvm::DIType BlockLiteralGeneric;
|
|
|
|
|
2011-09-29 08:00:45 +08:00
|
|
|
// LexicalBlockStack - Keep track of our current nested lexical block.
|
|
|
|
std::vector<llvm::TrackingVH<llvm::MDNode> > LexicalBlockStack;
|
2010-01-30 02:11:03 +08:00
|
|
|
llvm::DenseMap<const Decl *, llvm::WeakVH> RegionMap;
|
2011-09-29 08:00:45 +08:00
|
|
|
// FnBeginRegionCount - Keep track of LexicalBlockStack counter at the
|
|
|
|
// beginning of a function. This is used to pop unbalanced regions at
|
|
|
|
// the end of a function.
|
2010-07-23 06:29:16 +08:00
|
|
|
std::vector<unsigned> FnBeginRegionCount;
|
|
|
|
|
2010-01-29 02:21:00 +08:00
|
|
|
/// DebugInfoNames - This is a storage for names that are
|
2010-01-14 08:36:21 +08:00
|
|
|
/// constructed on demand. For example, C++ destructors, C++ operators etc..
|
2010-01-29 02:21:00 +08:00
|
|
|
llvm::BumpPtrAllocator DebugInfoNames;
|
2011-07-20 14:58:45 +08:00
|
|
|
StringRef CWDName;
|
2010-01-14 08:36:21 +08:00
|
|
|
|
2010-03-30 08:27:51 +08:00
|
|
|
llvm::DenseMap<const char *, llvm::WeakVH> DIFileCache;
|
2010-01-19 09:54:44 +08:00
|
|
|
llvm::DenseMap<const FunctionDecl *, llvm::WeakVH> SPCache;
|
2010-02-02 03:16:32 +08:00
|
|
|
llvm::DenseMap<const NamespaceDecl *, llvm::WeakVH> NameSpaceCache;
|
2010-01-19 09:54:44 +08:00
|
|
|
|
2012-02-01 14:07:23 +08:00
|
|
|
/// Helper functions for getOrCreateLimitedType.
|
|
|
|
llvm::DIType CreateLimitedType(const RecordType *Ty);
|
|
|
|
|
2008-05-25 13:15:42 +08:00
|
|
|
/// Helper functions for getOrCreateType.
|
2010-11-02 00:52:40 +08:00
|
|
|
llvm::DIType CreateType(const BuiltinType *Ty);
|
2010-12-09 08:25:29 +08:00
|
|
|
llvm::DIType CreateType(const ComplexType *Ty);
|
2010-03-09 08:44:50 +08:00
|
|
|
llvm::DIType CreateQualifiedType(QualType Ty, llvm::DIFile F);
|
|
|
|
llvm::DIType CreateType(const TypedefType *Ty, llvm::DIFile F);
|
2009-09-09 23:08:12 +08:00
|
|
|
llvm::DIType CreateType(const ObjCObjectPointerType *Ty,
|
2010-03-09 08:44:50 +08:00
|
|
|
llvm::DIFile F);
|
|
|
|
llvm::DIType CreateType(const PointerType *Ty, llvm::DIFile F);
|
|
|
|
llvm::DIType CreateType(const BlockPointerType *Ty, llvm::DIFile F);
|
|
|
|
llvm::DIType CreateType(const FunctionType *Ty, llvm::DIFile F);
|
2011-01-18 06:23:07 +08:00
|
|
|
llvm::DIType CreateType(const RecordType *Ty);
|
2010-03-09 08:44:50 +08:00
|
|
|
llvm::DIType CreateType(const ObjCInterfaceType *Ty, llvm::DIFile F);
|
2010-05-15 19:32:37 +08:00
|
|
|
llvm::DIType CreateType(const ObjCObjectType *Ty, llvm::DIFile F);
|
2010-03-09 08:44:50 +08:00
|
|
|
llvm::DIType CreateType(const VectorType *Ty, llvm::DIFile F);
|
|
|
|
llvm::DIType CreateType(const ArrayType *Ty, llvm::DIFile F);
|
|
|
|
llvm::DIType CreateType(const LValueReferenceType *Ty, llvm::DIFile F);
|
2011-01-22 09:58:15 +08:00
|
|
|
llvm::DIType CreateType(const RValueReferenceType *Ty, llvm::DIFile Unit);
|
2010-03-09 08:44:50 +08:00
|
|
|
llvm::DIType CreateType(const MemberPointerType *Ty, llvm::DIFile F);
|
2011-10-07 07:00:33 +08:00
|
|
|
llvm::DIType CreateType(const AtomicType *Ty, llvm::DIFile F);
|
2011-01-18 06:23:07 +08:00
|
|
|
llvm::DIType CreateEnumType(const EnumDecl *ED);
|
2011-12-17 07:40:18 +08:00
|
|
|
llvm::DIType getTypeOrNull(const QualType);
|
2010-01-28 08:28:01 +08:00
|
|
|
llvm::DIType getOrCreateMethodType(const CXXMethodDecl *Method,
|
2010-03-09 08:44:50 +08:00
|
|
|
llvm::DIFile F);
|
2011-06-01 04:46:46 +08:00
|
|
|
llvm::DIType getOrCreateFunctionType(const Decl *D, QualType FnType,
|
|
|
|
llvm::DIFile F);
|
2010-03-09 08:44:50 +08:00
|
|
|
llvm::DIType getOrCreateVTablePtrType(llvm::DIFile F);
|
2010-12-09 08:33:05 +08:00
|
|
|
llvm::DINameSpace getOrCreateNameSpace(const NamespaceDecl *N);
|
2010-10-01 03:05:55 +08:00
|
|
|
llvm::DIType CreatePointeeType(QualType PointeeTy, llvm::DIFile F);
|
2009-11-07 03:19:55 +08:00
|
|
|
llvm::DIType CreatePointerLikeType(unsigned Tag,
|
|
|
|
const Type *Ty, QualType PointeeTy,
|
2010-03-09 08:44:50 +08:00
|
|
|
llvm::DIFile F);
|
2010-01-26 12:49:33 +08:00
|
|
|
|
2010-01-26 13:19:50 +08:00
|
|
|
llvm::DISubprogram CreateCXXMemberFunction(const CXXMethodDecl *Method,
|
2010-03-09 08:44:50 +08:00
|
|
|
llvm::DIFile F,
|
2010-08-21 06:02:57 +08:00
|
|
|
llvm::DIType RecordTy);
|
2010-01-26 12:49:33 +08:00
|
|
|
|
2010-01-19 09:54:44 +08:00
|
|
|
void CollectCXXMemberFunctions(const CXXRecordDecl *Decl,
|
2010-03-09 08:44:50 +08:00
|
|
|
llvm::DIFile F,
|
2011-07-20 14:58:45 +08:00
|
|
|
SmallVectorImpl<llvm::Value *> &E,
|
2010-08-21 06:02:57 +08:00
|
|
|
llvm::DIType T);
|
2010-08-28 01:47:47 +08:00
|
|
|
|
|
|
|
void CollectCXXFriends(const CXXRecordDecl *Decl,
|
|
|
|
llvm::DIFile F,
|
2011-07-20 14:58:45 +08:00
|
|
|
SmallVectorImpl<llvm::Value *> &EltTys,
|
2010-08-28 01:47:47 +08:00
|
|
|
llvm::DIType RecordTy);
|
|
|
|
|
2010-01-26 07:32:18 +08:00
|
|
|
void CollectCXXBases(const CXXRecordDecl *Decl,
|
2010-03-09 08:44:50 +08:00
|
|
|
llvm::DIFile F,
|
2011-07-20 14:58:45 +08:00
|
|
|
SmallVectorImpl<llvm::Value *> &EltTys,
|
2010-08-21 06:02:57 +08:00
|
|
|
llvm::DIType RecordTy);
|
2011-04-06 06:54:11 +08:00
|
|
|
|
|
|
|
llvm::DIArray
|
|
|
|
CollectTemplateParams(const TemplateParameterList *TPList,
|
|
|
|
const TemplateArgumentList &TAList,
|
|
|
|
llvm::DIFile Unit);
|
|
|
|
llvm::DIArray
|
|
|
|
CollectFunctionTemplateParams(const FunctionDecl *FD, llvm::DIFile Unit);
|
2011-04-06 01:30:54 +08:00
|
|
|
llvm::DIArray
|
|
|
|
CollectCXXTemplateParams(const ClassTemplateSpecializationDecl *TS,
|
|
|
|
llvm::DIFile F);
|
|
|
|
|
2011-07-20 14:58:45 +08:00
|
|
|
llvm::DIType createFieldType(StringRef name, QualType type,
|
2011-10-11 02:28:20 +08:00
|
|
|
uint64_t sizeInBitsOverride, SourceLocation loc,
|
2011-02-23 06:38:33 +08:00
|
|
|
AccessSpecifier AS, uint64_t offsetInBits,
|
2011-06-25 06:00:59 +08:00
|
|
|
llvm::DIFile tunit,
|
|
|
|
llvm::DIDescriptor scope);
|
2012-01-26 09:57:13 +08:00
|
|
|
void CollectRecordStaticVars(const RecordDecl *, llvm::DIType);
|
2010-03-09 08:44:50 +08:00
|
|
|
void CollectRecordFields(const RecordDecl *Decl, llvm::DIFile F,
|
2011-07-20 14:58:45 +08:00
|
|
|
SmallVectorImpl<llvm::Value *> &E,
|
2011-06-25 06:00:59 +08:00
|
|
|
llvm::DIType RecordTy);
|
2010-01-29 02:11:52 +08:00
|
|
|
|
2010-04-18 04:15:18 +08:00
|
|
|
void CollectVTableInfo(const CXXRecordDecl *Decl,
|
2010-03-09 08:44:50 +08:00
|
|
|
llvm::DIFile F,
|
2011-07-20 14:58:45 +08:00
|
|
|
SmallVectorImpl<llvm::Value *> &EltTys);
|
2010-01-29 02:11:52 +08:00
|
|
|
|
2011-10-14 05:45:18 +08:00
|
|
|
// CreateLexicalBlock - Create a new lexical block node and push it on
|
|
|
|
// the stack.
|
|
|
|
void CreateLexicalBlock(SourceLocation Loc);
|
|
|
|
|
2008-05-08 16:54:20 +08:00
|
|
|
public:
|
2009-12-07 02:00:51 +08:00
|
|
|
CGDebugInfo(CodeGenModule &CGM);
|
2008-05-08 16:54:20 +08:00
|
|
|
~CGDebugInfo();
|
2011-08-16 07:01:55 +08:00
|
|
|
void finalize() { DBuilder.finalize(); }
|
2008-05-08 16:54:20 +08:00
|
|
|
|
2008-10-18 00:15:48 +08:00
|
|
|
/// setLocation - Update the current source location. If \arg loc is
|
|
|
|
/// invalid it is ignored.
|
2008-11-10 14:08:34 +08:00
|
|
|
void setLocation(SourceLocation Loc);
|
2008-05-08 16:54:20 +08:00
|
|
|
|
2011-09-29 08:00:41 +08:00
|
|
|
/// EmitLocation - Emit metadata to indicate a change in line/column
|
|
|
|
/// information in the source file.
|
2011-10-14 05:45:18 +08:00
|
|
|
void EmitLocation(CGBuilderTy &Builder, SourceLocation Loc);
|
2008-05-25 13:15:42 +08:00
|
|
|
|
|
|
|
/// EmitFunctionStart - Emit a call to llvm.dbg.function.start to indicate
|
2008-10-19 02:22:23 +08:00
|
|
|
/// start of a new function.
|
2010-01-14 08:36:21 +08:00
|
|
|
void EmitFunctionStart(GlobalDecl GD, QualType FnType,
|
2008-11-01 09:53:16 +08:00
|
|
|
llvm::Function *Fn, CGBuilderTy &Builder);
|
2009-09-09 23:08:12 +08:00
|
|
|
|
2010-07-23 06:29:16 +08:00
|
|
|
/// EmitFunctionEnd - Constructs the debug code for exiting a function.
|
|
|
|
void EmitFunctionEnd(CGBuilderTy &Builder);
|
|
|
|
|
2011-03-24 00:29:39 +08:00
|
|
|
/// UpdateCompletedType - Update type cache because the type is now
|
|
|
|
/// translated.
|
|
|
|
void UpdateCompletedType(const TagDecl *TD);
|
|
|
|
|
2011-09-29 08:00:45 +08:00
|
|
|
/// EmitLexicalBlockStart - Emit metadata to indicate the beginning of a
|
|
|
|
/// new lexical block and push the block onto the stack.
|
2011-10-14 05:45:18 +08:00
|
|
|
void EmitLexicalBlockStart(CGBuilderTy &Builder, SourceLocation Loc);
|
2009-09-09 23:08:12 +08:00
|
|
|
|
2011-09-29 08:00:45 +08:00
|
|
|
/// EmitLexicalBlockEnd - Emit metadata to indicate the end of a new lexical
|
|
|
|
/// block and pop the current block.
|
2011-10-14 05:45:18 +08:00
|
|
|
void EmitLexicalBlockEnd(CGBuilderTy &Builder, SourceLocation Loc);
|
2008-05-30 18:30:31 +08:00
|
|
|
|
2008-11-10 14:08:34 +08:00
|
|
|
/// EmitDeclareOfAutoVariable - Emit call to llvm.dbg.declare for an automatic
|
|
|
|
/// variable declaration.
|
|
|
|
void EmitDeclareOfAutoVariable(const VarDecl *Decl, llvm::Value *AI,
|
|
|
|
CGBuilderTy &Builder);
|
2008-06-05 16:59:10 +08:00
|
|
|
|
2009-09-30 10:43:10 +08:00
|
|
|
/// EmitDeclareOfBlockDeclRefVariable - Emit call to llvm.dbg.declare for an
|
|
|
|
/// imported variable declaration in a block.
|
2011-02-07 18:33:21 +08:00
|
|
|
void EmitDeclareOfBlockDeclRefVariable(const VarDecl *variable,
|
|
|
|
llvm::Value *storage,
|
2009-09-30 10:43:10 +08:00
|
|
|
CGBuilderTy &Builder,
|
2011-02-07 18:33:21 +08:00
|
|
|
const CGBlockInfo &blockInfo);
|
2009-09-30 10:43:10 +08:00
|
|
|
|
2008-11-10 14:08:34 +08:00
|
|
|
/// EmitDeclareOfArgVariable - Emit call to llvm.dbg.declare for an argument
|
|
|
|
/// variable declaration.
|
|
|
|
void EmitDeclareOfArgVariable(const VarDecl *Decl, llvm::Value *AI,
|
2011-03-04 04:13:15 +08:00
|
|
|
unsigned ArgNo, CGBuilderTy &Builder);
|
2009-09-09 23:08:12 +08:00
|
|
|
|
2011-02-23 06:38:33 +08:00
|
|
|
/// EmitDeclareOfBlockLiteralArgVariable - Emit call to
|
|
|
|
/// llvm.dbg.declare for the block-literal argument to a block
|
|
|
|
/// invocation function.
|
|
|
|
void EmitDeclareOfBlockLiteralArgVariable(const CGBlockInfo &block,
|
|
|
|
llvm::Value *addr,
|
|
|
|
CGBuilderTy &Builder);
|
|
|
|
|
2008-06-05 16:59:10 +08:00
|
|
|
/// EmitGlobalVariable - Emit information about a global variable.
|
2008-11-10 14:08:34 +08:00
|
|
|
void EmitGlobalVariable(llvm::GlobalVariable *GV, const VarDecl *Decl);
|
2009-02-27 05:10:26 +08:00
|
|
|
|
|
|
|
/// EmitGlobalVariable - Emit information about an objective-c interface.
|
|
|
|
void EmitGlobalVariable(llvm::GlobalVariable *GV, ObjCInterfaceDecl *Decl);
|
2009-09-09 23:08:12 +08:00
|
|
|
|
2010-08-11 01:53:33 +08:00
|
|
|
/// EmitGlobalVariable - Emit global variable's debug info.
|
2010-10-09 09:34:31 +08:00
|
|
|
void EmitGlobalVariable(const ValueDecl *VD, llvm::Constant *Init);
|
2010-08-10 15:24:25 +08:00
|
|
|
|
2010-10-01 03:05:55 +08:00
|
|
|
/// getOrCreateRecordType - Emit record type's standalone debug info.
|
|
|
|
llvm::DIType getOrCreateRecordType(QualType Ty, SourceLocation L);
|
2008-11-03 17:11:11 +08:00
|
|
|
private:
|
2008-11-10 14:08:34 +08:00
|
|
|
/// EmitDeclare - Emit call to llvm.dbg.declare for a variable declaration.
|
|
|
|
void EmitDeclare(const VarDecl *decl, unsigned Tag, llvm::Value *AI,
|
2011-03-04 04:13:15 +08:00
|
|
|
unsigned ArgNo, CGBuilderTy &Builder);
|
2009-09-09 23:08:12 +08:00
|
|
|
|
2010-02-11 02:49:08 +08:00
|
|
|
// EmitTypeForVarWithBlocksAttr - Build up structure info for the byref.
|
|
|
|
// See BuildByRefType.
|
|
|
|
llvm::DIType EmitTypeForVarWithBlocksAttr(const ValueDecl *VD,
|
|
|
|
uint64_t *OffSet);
|
|
|
|
|
2010-01-29 07:15:27 +08:00
|
|
|
/// getContextDescriptor - Get context info for the decl.
|
2010-12-09 08:33:05 +08:00
|
|
|
llvm::DIDescriptor getContextDescriptor(const Decl *Decl);
|
2009-10-06 08:35:31 +08:00
|
|
|
|
2012-01-25 10:06:59 +08:00
|
|
|
/// createRecordFwdDecl - Create a forward decl for a RecordType in a given
|
|
|
|
/// context.
|
|
|
|
llvm::DIType createRecordFwdDecl(const RecordDecl *, llvm::DIDescriptor);
|
|
|
|
|
2012-01-25 10:06:52 +08:00
|
|
|
/// createContextChain - Create a set of decls for the context chain.
|
2012-01-21 06:10:15 +08:00
|
|
|
llvm::DIDescriptor createContextChain(const Decl *Decl);
|
|
|
|
|
2010-07-27 23:17:16 +08:00
|
|
|
/// getCurrentDirname - Return current directory name.
|
2011-07-20 14:58:45 +08:00
|
|
|
StringRef getCurrentDirname();
|
2010-07-27 23:17:16 +08:00
|
|
|
|
2010-03-09 08:44:50 +08:00
|
|
|
/// CreateCompileUnit - Create new compile unit.
|
|
|
|
void CreateCompileUnit();
|
|
|
|
|
|
|
|
/// getOrCreateFile - Get the file debug info descriptor for the input
|
|
|
|
/// location.
|
|
|
|
llvm::DIFile getOrCreateFile(SourceLocation Loc);
|
2008-05-25 13:15:42 +08:00
|
|
|
|
2010-10-29 06:03:20 +08:00
|
|
|
/// getOrCreateMainFile - Get the file info for main compile unit.
|
|
|
|
llvm::DIFile getOrCreateMainFile();
|
|
|
|
|
2008-05-25 13:15:42 +08:00
|
|
|
/// getOrCreateType - Get the type from the cache or create a new type if
|
|
|
|
/// necessary.
|
2010-03-09 08:44:50 +08:00
|
|
|
llvm::DIType getOrCreateType(QualType Ty, llvm::DIFile F);
|
2009-09-20 03:27:14 +08:00
|
|
|
|
2012-02-01 14:07:23 +08:00
|
|
|
/// getOrCreateLimitedType - Get the type from the cache or create a flat
|
|
|
|
/// limited type.
|
|
|
|
llvm::DIType getOrCreateLimitedType(QualType Ty, llvm::DIFile F);
|
|
|
|
|
2009-09-20 03:27:14 +08:00
|
|
|
/// CreateTypeNode - Create type metadata for a source language type.
|
2010-03-09 08:44:50 +08:00
|
|
|
llvm::DIType CreateTypeNode(QualType Ty, llvm::DIFile F);
|
2010-01-14 08:36:21 +08:00
|
|
|
|
2012-02-01 14:07:23 +08:00
|
|
|
/// CreateLimitedTypeNode - Create type metadata for a source language type,
|
|
|
|
/// but create as little as possible.
|
|
|
|
llvm::DIType CreateLimitedTypeNode(QualType Ty, llvm::DIFile F);
|
|
|
|
|
2010-04-25 04:26:20 +08:00
|
|
|
/// CreateMemberType - Create new member and increase Offset by FType's size.
|
2010-04-25 04:19:58 +08:00
|
|
|
llvm::DIType CreateMemberType(llvm::DIFile Unit, QualType FType,
|
2011-07-20 14:58:45 +08:00
|
|
|
StringRef Name, uint64_t *Offset);
|
2010-04-25 04:19:58 +08:00
|
|
|
|
2011-04-23 08:08:01 +08:00
|
|
|
/// getFunctionDeclaration - Return debug info descriptor to describe method
|
|
|
|
/// declaration for the given method definition.
|
|
|
|
llvm::DISubprogram getFunctionDeclaration(const Decl *D);
|
|
|
|
|
2010-01-14 08:36:21 +08:00
|
|
|
/// getFunctionName - Get function name for the given FunctionDecl. If the
|
|
|
|
/// name is constructred on demand (e.g. C++ destructor) then the name
|
|
|
|
/// is stored on the side.
|
2011-07-20 14:58:45 +08:00
|
|
|
StringRef getFunctionName(const FunctionDecl *FD);
|
2010-10-13 07:24:54 +08:00
|
|
|
|
2010-09-03 02:01:51 +08:00
|
|
|
/// getObjCMethodName - Returns the unmangled name of an Objective-C method.
|
|
|
|
/// This is the display name for the debugging info.
|
2011-07-20 14:58:45 +08:00
|
|
|
StringRef getObjCMethodName(const ObjCMethodDecl *FD);
|
2010-01-29 02:11:52 +08:00
|
|
|
|
2011-04-19 01:30:25 +08:00
|
|
|
/// getSelectorName - Return selector name. This is used for debugging
|
2011-04-16 08:37:51 +08:00
|
|
|
/// info.
|
2011-07-20 14:58:45 +08:00
|
|
|
StringRef getSelectorName(Selector S);
|
2011-04-16 08:37:51 +08:00
|
|
|
|
2010-07-21 04:24:18 +08:00
|
|
|
/// getClassName - Get class name including template argument list.
|
2011-07-20 14:58:45 +08:00
|
|
|
StringRef getClassName(RecordDecl *RD);
|
2010-07-21 04:24:18 +08:00
|
|
|
|
2010-04-18 04:15:18 +08:00
|
|
|
/// getVTableName - Get vtable name for the given Class.
|
2011-07-20 14:58:45 +08:00
|
|
|
StringRef getVTableName(const CXXRecordDecl *Decl);
|
2010-01-29 02:11:52 +08:00
|
|
|
|
2010-05-13 07:46:38 +08:00
|
|
|
/// getLineNumber - Get line number for the location. If location is invalid
|
|
|
|
/// then use current location.
|
|
|
|
unsigned getLineNumber(SourceLocation Loc);
|
|
|
|
|
|
|
|
/// getColumnNumber - Get column number for the location. If location is
|
|
|
|
/// invalid then use current location.
|
|
|
|
unsigned getColumnNumber(SourceLocation Loc);
|
2008-05-08 16:54:20 +08:00
|
|
|
};
|
|
|
|
} // namespace CodeGen
|
|
|
|
} // namespace clang
|
|
|
|
|
2009-10-07 02:36:08 +08:00
|
|
|
|
2008-05-08 16:54:20 +08:00
|
|
|
#endif
|