DebugInfo: Metadata constructs now start with DI*

LLVM r236120 renamed debug info IR constructs to use a `DI` prefix, now
that the `DIDescriptor` hierarchy has been gone for about a week.  This
commit was generated using the rename-md-di-nodes.sh upgrade script
attached to PR23080, followed by running clang-format-diff.py on the
`lib/` portion of the patch.

llvm-svn: 236121
This commit is contained in:
Duncan P. N. Exon Smith 2015-04-29 16:40:08 +00:00
parent a9308c49ef
commit 9dd4e4e63a
142 changed files with 1051 additions and 1052 deletions

File diff suppressed because it is too large Load Diff

View File

@ -52,30 +52,30 @@ class CGDebugInfo {
CodeGenModule &CGM; CodeGenModule &CGM;
const CodeGenOptions::DebugInfoKind DebugKind; const CodeGenOptions::DebugInfoKind DebugKind;
llvm::DIBuilder DBuilder; llvm::DIBuilder DBuilder;
llvm::MDCompileUnit *TheCU = nullptr; llvm::DICompileUnit *TheCU = nullptr;
SourceLocation CurLoc; SourceLocation CurLoc;
llvm::MDType *VTablePtrType = nullptr; llvm::DIType *VTablePtrType = nullptr;
llvm::MDType *ClassTy = nullptr; llvm::DIType *ClassTy = nullptr;
llvm::MDCompositeType *ObjTy = nullptr; llvm::DICompositeType *ObjTy = nullptr;
llvm::MDType *SelTy = nullptr; llvm::DIType *SelTy = nullptr;
llvm::MDType *OCLImage1dDITy = nullptr; llvm::DIType *OCLImage1dDITy = nullptr;
llvm::MDType *OCLImage1dArrayDITy = nullptr; llvm::DIType *OCLImage1dArrayDITy = nullptr;
llvm::MDType *OCLImage1dBufferDITy = nullptr; llvm::DIType *OCLImage1dBufferDITy = nullptr;
llvm::MDType *OCLImage2dDITy = nullptr; llvm::DIType *OCLImage2dDITy = nullptr;
llvm::MDType *OCLImage2dArrayDITy = nullptr; llvm::DIType *OCLImage2dArrayDITy = nullptr;
llvm::MDType *OCLImage3dDITy = nullptr; llvm::DIType *OCLImage3dDITy = nullptr;
llvm::MDType *OCLEventDITy = nullptr; llvm::DIType *OCLEventDITy = nullptr;
llvm::MDType *BlockLiteralGeneric = nullptr; llvm::DIType *BlockLiteralGeneric = nullptr;
/// \brief Cache of previously constructed Types. /// \brief Cache of previously constructed Types.
llvm::DenseMap<const void *, llvm::TrackingMDRef> TypeCache; llvm::DenseMap<const void *, llvm::TrackingMDRef> TypeCache;
struct ObjCInterfaceCacheEntry { struct ObjCInterfaceCacheEntry {
const ObjCInterfaceType *Type; const ObjCInterfaceType *Type;
llvm::MDType *Decl; llvm::DIType *Decl;
llvm::MDFile *Unit; llvm::DIFile *Unit;
ObjCInterfaceCacheEntry(const ObjCInterfaceType *Type, llvm::MDType *Decl, ObjCInterfaceCacheEntry(const ObjCInterfaceType *Type, llvm::DIType *Decl,
llvm::MDFile *Unit) llvm::DIFile *Unit)
: Type(Type), Decl(Decl), Unit(Unit) {} : Type(Type), Decl(Decl), Unit(Unit) {}
}; };
@ -96,7 +96,7 @@ class CGDebugInfo {
FwdDeclReplaceMap; FwdDeclReplaceMap;
// LexicalBlockStack - Keep track of our current nested lexical block. // LexicalBlockStack - Keep track of our current nested lexical block.
std::vector<llvm::TypedTrackingMDRef<llvm::MDScope>> LexicalBlockStack; std::vector<llvm::TypedTrackingMDRef<llvm::DIScope>> LexicalBlockStack;
llvm::DenseMap<const Decl *, llvm::TrackingMDRef> RegionMap; llvm::DenseMap<const Decl *, llvm::TrackingMDRef> RegionMap;
// FnBeginRegionCount - Keep track of LexicalBlockStack counter at the // FnBeginRegionCount - Keep track of LexicalBlockStack counter at the
// beginning of a function. This is used to pop unbalanced regions at // beginning of a function. This is used to pop unbalanced regions at
@ -120,94 +120,94 @@ class CGDebugInfo {
/// Helper functions for getOrCreateType. /// Helper functions for getOrCreateType.
unsigned Checksum(const ObjCInterfaceDecl *InterfaceDecl); unsigned Checksum(const ObjCInterfaceDecl *InterfaceDecl);
llvm::MDType *CreateType(const BuiltinType *Ty); llvm::DIType *CreateType(const BuiltinType *Ty);
llvm::MDType *CreateType(const ComplexType *Ty); llvm::DIType *CreateType(const ComplexType *Ty);
llvm::MDType *CreateQualifiedType(QualType Ty, llvm::MDFile *Fg); llvm::DIType *CreateQualifiedType(QualType Ty, llvm::DIFile *Fg);
llvm::MDType *CreateType(const TypedefType *Ty, llvm::MDFile *Fg); llvm::DIType *CreateType(const TypedefType *Ty, llvm::DIFile *Fg);
llvm::MDType *CreateType(const TemplateSpecializationType *Ty, llvm::DIType *CreateType(const TemplateSpecializationType *Ty,
llvm::MDFile *Fg); llvm::DIFile *Fg);
llvm::MDType *CreateType(const ObjCObjectPointerType *Ty, llvm::MDFile *F); llvm::DIType *CreateType(const ObjCObjectPointerType *Ty, llvm::DIFile *F);
llvm::MDType *CreateType(const PointerType *Ty, llvm::MDFile *F); llvm::DIType *CreateType(const PointerType *Ty, llvm::DIFile *F);
llvm::MDType *CreateType(const BlockPointerType *Ty, llvm::MDFile *F); llvm::DIType *CreateType(const BlockPointerType *Ty, llvm::DIFile *F);
llvm::MDType *CreateType(const FunctionType *Ty, llvm::MDFile *F); llvm::DIType *CreateType(const FunctionType *Ty, llvm::DIFile *F);
llvm::MDType *CreateType(const RecordType *Tyg); llvm::DIType *CreateType(const RecordType *Tyg);
llvm::MDType *CreateTypeDefinition(const RecordType *Ty); llvm::DIType *CreateTypeDefinition(const RecordType *Ty);
llvm::MDCompositeType *CreateLimitedType(const RecordType *Ty); llvm::DICompositeType *CreateLimitedType(const RecordType *Ty);
void CollectContainingType(const CXXRecordDecl *RD, void CollectContainingType(const CXXRecordDecl *RD,
llvm::MDCompositeType *CT); llvm::DICompositeType *CT);
llvm::MDType *CreateType(const ObjCInterfaceType *Ty, llvm::MDFile *F); llvm::DIType *CreateType(const ObjCInterfaceType *Ty, llvm::DIFile *F);
llvm::MDType *CreateTypeDefinition(const ObjCInterfaceType *Ty, llvm::DIType *CreateTypeDefinition(const ObjCInterfaceType *Ty,
llvm::MDFile *F); llvm::DIFile *F);
llvm::MDType *CreateType(const ObjCObjectType *Ty, llvm::MDFile *F); llvm::DIType *CreateType(const ObjCObjectType *Ty, llvm::DIFile *F);
llvm::MDType *CreateType(const VectorType *Ty, llvm::MDFile *F); llvm::DIType *CreateType(const VectorType *Ty, llvm::DIFile *F);
llvm::MDType *CreateType(const ArrayType *Ty, llvm::MDFile *F); llvm::DIType *CreateType(const ArrayType *Ty, llvm::DIFile *F);
llvm::MDType *CreateType(const LValueReferenceType *Ty, llvm::MDFile *F); llvm::DIType *CreateType(const LValueReferenceType *Ty, llvm::DIFile *F);
llvm::MDType *CreateType(const RValueReferenceType *Ty, llvm::MDFile *Unit); llvm::DIType *CreateType(const RValueReferenceType *Ty, llvm::DIFile *Unit);
llvm::MDType *CreateType(const MemberPointerType *Ty, llvm::MDFile *F); llvm::DIType *CreateType(const MemberPointerType *Ty, llvm::DIFile *F);
llvm::MDType *CreateType(const AtomicType *Ty, llvm::MDFile *F); llvm::DIType *CreateType(const AtomicType *Ty, llvm::DIFile *F);
llvm::MDType *CreateEnumType(const EnumType *Ty); llvm::DIType *CreateEnumType(const EnumType *Ty);
llvm::MDType *CreateTypeDefinition(const EnumType *Ty); llvm::DIType *CreateTypeDefinition(const EnumType *Ty);
llvm::MDType *CreateSelfType(const QualType &QualTy, llvm::MDType *Ty); llvm::DIType *CreateSelfType(const QualType &QualTy, llvm::DIType *Ty);
llvm::MDType *getTypeOrNull(const QualType); llvm::DIType *getTypeOrNull(const QualType);
llvm::MDSubroutineType *getOrCreateMethodType(const CXXMethodDecl *Method, llvm::DISubroutineType *getOrCreateMethodType(const CXXMethodDecl *Method,
llvm::MDFile *F); llvm::DIFile *F);
llvm::MDSubroutineType * llvm::DISubroutineType *
getOrCreateInstanceMethodType(QualType ThisPtr, const FunctionProtoType *Func, getOrCreateInstanceMethodType(QualType ThisPtr, const FunctionProtoType *Func,
llvm::MDFile *Unit); llvm::DIFile *Unit);
llvm::MDSubroutineType * llvm::DISubroutineType *
getOrCreateFunctionType(const Decl *D, QualType FnType, llvm::MDFile *F); getOrCreateFunctionType(const Decl *D, QualType FnType, llvm::DIFile *F);
llvm::MDType *getOrCreateVTablePtrType(llvm::MDFile *F); llvm::DIType *getOrCreateVTablePtrType(llvm::DIFile *F);
llvm::MDNamespace *getOrCreateNameSpace(const NamespaceDecl *N); llvm::DINamespace *getOrCreateNameSpace(const NamespaceDecl *N);
llvm::MDType *getOrCreateTypeDeclaration(QualType PointeeTy, llvm::MDFile *F); llvm::DIType *getOrCreateTypeDeclaration(QualType PointeeTy, llvm::DIFile *F);
llvm::MDType *CreatePointerLikeType(llvm::dwarf::Tag Tag, const Type *Ty, llvm::DIType *CreatePointerLikeType(llvm::dwarf::Tag Tag, const Type *Ty,
QualType PointeeTy, llvm::MDFile *F); QualType PointeeTy, llvm::DIFile *F);
llvm::Value *getCachedInterfaceTypeOrNull(const QualType Ty); llvm::Value *getCachedInterfaceTypeOrNull(const QualType Ty);
llvm::MDType *getOrCreateStructPtrType(StringRef Name, llvm::MDType *&Cache); llvm::DIType *getOrCreateStructPtrType(StringRef Name, llvm::DIType *&Cache);
llvm::MDSubprogram *CreateCXXMemberFunction(const CXXMethodDecl *Method, llvm::DISubprogram *CreateCXXMemberFunction(const CXXMethodDecl *Method,
llvm::MDFile *F, llvm::DIFile *F,
llvm::MDType *RecordTy); llvm::DIType *RecordTy);
void CollectCXXMemberFunctions(const CXXRecordDecl *Decl, llvm::MDFile *F, void CollectCXXMemberFunctions(const CXXRecordDecl *Decl, llvm::DIFile *F,
SmallVectorImpl<llvm::Metadata *> &E, SmallVectorImpl<llvm::Metadata *> &E,
llvm::MDType *T); llvm::DIType *T);
void CollectCXXBases(const CXXRecordDecl *Decl, llvm::MDFile *F, void CollectCXXBases(const CXXRecordDecl *Decl, llvm::DIFile *F,
SmallVectorImpl<llvm::Metadata *> &EltTys, SmallVectorImpl<llvm::Metadata *> &EltTys,
llvm::MDType *RecordTy); llvm::DIType *RecordTy);
llvm::DebugNodeArray llvm::DINodeArray CollectTemplateParams(const TemplateParameterList *TPList,
CollectTemplateParams(const TemplateParameterList *TPList, ArrayRef<TemplateArgument> TAList,
ArrayRef<TemplateArgument> TAList, llvm::MDFile *Unit); llvm::DIFile *Unit);
llvm::DebugNodeArray CollectFunctionTemplateParams(const FunctionDecl *FD, llvm::DINodeArray CollectFunctionTemplateParams(const FunctionDecl *FD,
llvm::MDFile *Unit); llvm::DIFile *Unit);
llvm::DebugNodeArray llvm::DINodeArray
CollectCXXTemplateParams(const ClassTemplateSpecializationDecl *TS, CollectCXXTemplateParams(const ClassTemplateSpecializationDecl *TS,
llvm::MDFile *F); llvm::DIFile *F);
llvm::MDType *createFieldType(StringRef name, QualType type, llvm::DIType *createFieldType(StringRef name, QualType type,
uint64_t sizeInBitsOverride, SourceLocation loc, uint64_t sizeInBitsOverride, SourceLocation loc,
AccessSpecifier AS, uint64_t offsetInBits, AccessSpecifier AS, uint64_t offsetInBits,
llvm::MDFile *tunit, llvm::MDScope *scope, llvm::DIFile *tunit, llvm::DIScope *scope,
const RecordDecl *RD = nullptr); const RecordDecl *RD = nullptr);
// Helpers for collecting fields of a record. // Helpers for collecting fields of a record.
void CollectRecordLambdaFields(const CXXRecordDecl *CXXDecl, void CollectRecordLambdaFields(const CXXRecordDecl *CXXDecl,
SmallVectorImpl<llvm::Metadata *> &E, SmallVectorImpl<llvm::Metadata *> &E,
llvm::MDType *RecordTy); llvm::DIType *RecordTy);
llvm::MDDerivedType *CreateRecordStaticField(const VarDecl *Var, llvm::DIDerivedType *CreateRecordStaticField(const VarDecl *Var,
llvm::MDType *RecordTy, llvm::DIType *RecordTy,
const RecordDecl *RD); const RecordDecl *RD);
void CollectRecordNormalField(const FieldDecl *Field, uint64_t OffsetInBits, void CollectRecordNormalField(const FieldDecl *Field, uint64_t OffsetInBits,
llvm::MDFile *F, llvm::DIFile *F,
SmallVectorImpl<llvm::Metadata *> &E, SmallVectorImpl<llvm::Metadata *> &E,
llvm::MDType *RecordTy, const RecordDecl *RD); llvm::DIType *RecordTy, const RecordDecl *RD);
void CollectRecordFields(const RecordDecl *Decl, llvm::MDFile *F, void CollectRecordFields(const RecordDecl *Decl, llvm::DIFile *F,
SmallVectorImpl<llvm::Metadata *> &E, SmallVectorImpl<llvm::Metadata *> &E,
llvm::MDCompositeType *RecordTy); llvm::DICompositeType *RecordTy);
void CollectVTableInfo(const CXXRecordDecl *Decl, llvm::MDFile *F, void CollectVTableInfo(const CXXRecordDecl *Decl, llvm::DIFile *F,
SmallVectorImpl<llvm::Metadata *> &EltTys); SmallVectorImpl<llvm::Metadata *> &EltTys);
// CreateLexicalBlock - Create a new lexical block node and push it on // CreateLexicalBlock - Create a new lexical block node and push it on
@ -290,14 +290,14 @@ public:
void EmitUsingDecl(const UsingDecl &UD); void EmitUsingDecl(const UsingDecl &UD);
/// \brief Emit C++ namespace alias. /// \brief Emit C++ namespace alias.
llvm::MDImportedEntity *EmitNamespaceAlias(const NamespaceAliasDecl &NA); llvm::DIImportedEntity *EmitNamespaceAlias(const NamespaceAliasDecl &NA);
/// \brief Emit record type's standalone debug info. /// \brief Emit record type's standalone debug info.
llvm::MDType *getOrCreateRecordType(QualType Ty, SourceLocation L); llvm::DIType *getOrCreateRecordType(QualType Ty, SourceLocation L);
/// \brief Emit an objective c interface type standalone /// \brief Emit an objective c interface type standalone
/// debug info. /// debug info.
llvm::MDType *getOrCreateInterfaceType(QualType Ty, SourceLocation Loc); llvm::DIType *getOrCreateInterfaceType(QualType Ty, SourceLocation Loc);
void completeType(const EnumDecl *ED); void completeType(const EnumDecl *ED);
void completeType(const RecordDecl *RD); void completeType(const RecordDecl *RD);
@ -315,17 +315,17 @@ private:
// EmitTypeForVarWithBlocksAttr - Build up structure info for the byref. // EmitTypeForVarWithBlocksAttr - Build up structure info for the byref.
// See BuildByRefType. // See BuildByRefType.
llvm::MDType *EmitTypeForVarWithBlocksAttr(const VarDecl *VD, llvm::DIType *EmitTypeForVarWithBlocksAttr(const VarDecl *VD,
uint64_t *OffSet); uint64_t *OffSet);
/// \brief Get context info for the decl. /// \brief Get context info for the decl.
llvm::MDScope *getContextDescriptor(const Decl *Decl); llvm::DIScope *getContextDescriptor(const Decl *Decl);
llvm::MDScope *getCurrentContextDescriptor(const Decl *Decl); llvm::DIScope *getCurrentContextDescriptor(const Decl *Decl);
/// \brief Create a forward decl for a RecordType in a given context. /// \brief Create a forward decl for a RecordType in a given context.
llvm::MDCompositeType *getOrCreateRecordFwdDecl(const RecordType *, llvm::DICompositeType *getOrCreateRecordFwdDecl(const RecordType *,
llvm::MDScope *); llvm::DIScope *);
/// \brief Return current directory name. /// \brief Return current directory name.
StringRef getCurrentDirname(); StringRef getCurrentDirname();
@ -335,58 +335,58 @@ private:
/// \brief Get the file debug info descriptor for the input /// \brief Get the file debug info descriptor for the input
/// location. /// location.
llvm::MDFile *getOrCreateFile(SourceLocation Loc); llvm::DIFile *getOrCreateFile(SourceLocation Loc);
/// \brief Get the file info for main compile unit. /// \brief Get the file info for main compile unit.
llvm::MDFile *getOrCreateMainFile(); llvm::DIFile *getOrCreateMainFile();
/// \brief Get the type from the cache or create a new type if /// \brief Get the type from the cache or create a new type if
/// necessary. /// necessary.
llvm::MDType *getOrCreateType(QualType Ty, llvm::MDFile *Fg); llvm::DIType *getOrCreateType(QualType Ty, llvm::DIFile *Fg);
/// \brief Get the type from the cache or create a new /// \brief Get the type from the cache or create a new
/// partial type if necessary. /// partial type if necessary.
llvm::MDType *getOrCreateLimitedType(const RecordType *Ty, llvm::MDFile *F); llvm::DIType *getOrCreateLimitedType(const RecordType *Ty, llvm::DIFile *F);
/// \brief Create type metadata for a source language type. /// \brief Create type metadata for a source language type.
llvm::MDType *CreateTypeNode(QualType Ty, llvm::MDFile *Fg); llvm::DIType *CreateTypeNode(QualType Ty, llvm::DIFile *Fg);
/// \brief return the underlying ObjCInterfaceDecl /// \brief return the underlying ObjCInterfaceDecl
/// if Ty is an ObjCInterface or a pointer to one. /// if Ty is an ObjCInterface or a pointer to one.
ObjCInterfaceDecl* getObjCInterfaceDecl(QualType Ty); ObjCInterfaceDecl* getObjCInterfaceDecl(QualType Ty);
/// \brief Create new member and increase Offset by FType's size. /// \brief Create new member and increase Offset by FType's size.
llvm::MDType *CreateMemberType(llvm::MDFile *Unit, QualType FType, llvm::DIType *CreateMemberType(llvm::DIFile *Unit, QualType FType,
StringRef Name, uint64_t *Offset); StringRef Name, uint64_t *Offset);
/// \brief Retrieve the DIDescriptor, if any, for the canonical form of this /// \brief Retrieve the DIDescriptor, if any, for the canonical form of this
/// declaration. /// declaration.
llvm::DebugNode *getDeclarationOrDefinition(const Decl *D); llvm::DINode *getDeclarationOrDefinition(const Decl *D);
/// \brief Return debug info descriptor to describe method /// \brief Return debug info descriptor to describe method
/// declaration for the given method definition. /// declaration for the given method definition.
llvm::MDSubprogram *getFunctionDeclaration(const Decl *D); llvm::DISubprogram *getFunctionDeclaration(const Decl *D);
/// Return debug info descriptor to describe in-class static data member /// Return debug info descriptor to describe in-class static data member
/// declaration for the given out-of-class definition. /// declaration for the given out-of-class definition.
llvm::MDDerivedType * llvm::DIDerivedType *
getOrCreateStaticDataMemberDeclarationOrNull(const VarDecl *D); getOrCreateStaticDataMemberDeclarationOrNull(const VarDecl *D);
/// \brief Create a subprogram describing the forward /// \brief Create a subprogram describing the forward
/// decalration represented in the given FunctionDecl. /// decalration represented in the given FunctionDecl.
llvm::MDSubprogram *getFunctionForwardDeclaration(const FunctionDecl *FD); llvm::DISubprogram *getFunctionForwardDeclaration(const FunctionDecl *FD);
/// \brief Create a global variable describing the forward decalration /// \brief Create a global variable describing the forward decalration
/// represented in the given VarDecl. /// represented in the given VarDecl.
llvm::MDGlobalVariable * llvm::DIGlobalVariable *
getGlobalVariableForwardDeclaration(const VarDecl *VD); getGlobalVariableForwardDeclaration(const VarDecl *VD);
/// Return a global variable that represents one of the collection of /// Return a global variable that represents one of the collection of
/// global variables created for an anonmyous union. /// global variables created for an anonmyous union.
llvm::MDGlobalVariable * llvm::DIGlobalVariable *
CollectAnonRecordDecls(const RecordDecl *RD, llvm::MDFile *Unit, CollectAnonRecordDecls(const RecordDecl *RD, llvm::DIFile *Unit,
unsigned LineNo, StringRef LinkageName, unsigned LineNo, StringRef LinkageName,
llvm::GlobalVariable *Var, llvm::MDScope *DContext); llvm::GlobalVariable *Var, llvm::DIScope *DContext);
/// \brief Get function name for the given FunctionDecl. If the /// \brief Get function name for the given FunctionDecl. If the
/// name is constructed on demand (e.g. C++ destructor) then the name /// name is constructed on demand (e.g. C++ destructor) then the name
@ -418,16 +418,16 @@ private:
/// \brief Collect various properties of a FunctionDecl. /// \brief Collect various properties of a FunctionDecl.
/// \param GD A GlobalDecl whose getDecl() must return a FunctionDecl. /// \param GD A GlobalDecl whose getDecl() must return a FunctionDecl.
void collectFunctionDeclProps(GlobalDecl GD, llvm::MDFile *Unit, void collectFunctionDeclProps(GlobalDecl GD, llvm::DIFile *Unit,
StringRef &Name, StringRef &LinkageName, StringRef &Name, StringRef &LinkageName,
llvm::MDScope *&FDContext, llvm::DIScope *&FDContext,
llvm::DebugNodeArray &TParamsArray, llvm::DINodeArray &TParamsArray,
unsigned &Flags); unsigned &Flags);
/// \brief Collect various properties of a VarDecl. /// \brief Collect various properties of a VarDecl.
void collectVarDeclProps(const VarDecl *VD, llvm::MDFile *&Unit, void collectVarDeclProps(const VarDecl *VD, llvm::DIFile *&Unit,
unsigned &LineNo, QualType &T, StringRef &Name, unsigned &LineNo, QualType &T, StringRef &Name,
StringRef &LinkageName, llvm::MDScope *&VDContext); StringRef &LinkageName, llvm::DIScope *&VDContext);
/// \brief Allocate a copy of \p A using the DebugInfoNames allocator /// \brief Allocate a copy of \p A using the DebugInfoNames allocator
/// and return a reference to it. If multiple arguments are given the strings /// and return a reference to it. If multiple arguments are given the strings

View File

@ -6,11 +6,11 @@ int main() {
return 0; return 0;
} }
// CHECK: !MDGlobalVariable(name: "localstatic" // CHECK: !DIGlobalVariable(name: "localstatic"
// CHECK-NOT: linkageName: // CHECK-NOT: linkageName:
// CHECK-SAME: line: 5, // CHECK-SAME: line: 5,
// CHECK-SAME: variable: i32* @main.localstatic // CHECK-SAME: variable: i32* @main.localstatic
// CHECK: !MDGlobalVariable(name: "global" // CHECK: !DIGlobalVariable(name: "global"
// CHECK-NOT: linkageName: // CHECK-NOT: linkageName:
// CHECK-SAME: line: 3, // CHECK-SAME: line: 3,
// CHECK-SAME: variable: i32* @global // CHECK-SAME: variable: i32* @global

View File

@ -11,6 +11,6 @@ int main() {
int j = foo(1); int j = foo(1);
return 0; return 0;
} }
// CHECK: !MDGlobalVariable(name: "b", // CHECK: !DIGlobalVariable(name: "b",
// CHECK-NOT: linkageName: // CHECK-NOT: linkageName:
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}

View File

@ -1,9 +1,9 @@
// RUN: %clang_cc1 -emit-llvm -g < %s | FileCheck %s // RUN: %clang_cc1 -emit-llvm -g < %s | FileCheck %s
// Test to check number of lexical scope identified in debug info. // Test to check number of lexical scope identified in debug info.
// CHECK: !MDLexicalBlock( // CHECK: !DILexicalBlock(
// CHECK: !MDLexicalBlock( // CHECK: !DILexicalBlock(
// CHECK: !MDLexicalBlock( // CHECK: !DILexicalBlock(
// CHECK: !MDLexicalBlock( // CHECK: !DILexicalBlock(
extern int bar(); extern int bar();
extern void foobar(); extern void foobar();

View File

@ -1,3 +1,3 @@
// RUN: %clang -emit-llvm -S -O0 -g %s -o - | FileCheck %s // RUN: %clang -emit-llvm -S -O0 -g %s -o - | FileCheck %s
// CHECK: !MDGlobalVariable( // CHECK: !DIGlobalVariable(
unsigned char ctable1[1] = { 0001 }; unsigned char ctable1[1] = { 0001 };

View File

@ -1,6 +1,6 @@
// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s // RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
// CHECK: !MDLexicalBlock( // CHECK: !DILexicalBlock(
// CHECK: !MDLexicalBlock( // CHECK: !DILexicalBlock(
int foo(int i) { int foo(int i) {
if (i) { if (i) {
int j = 2; int j = 2;

View File

@ -6,5 +6,5 @@ void foo() {
int p = 0; // line #5: CHECK: {{call.*llvm.dbg.declare.*%p.*\!dbg }}[[variable_p:![0-9]+]] int p = 0; // line #5: CHECK: {{call.*llvm.dbg.declare.*%p.*\!dbg }}[[variable_p:![0-9]+]]
} }
// Now match the line number records: // Now match the line number records:
// CHECK: {{^}}[[variable_l]] = !MDLocation(line: 5, // CHECK: {{^}}[[variable_l]] = !DILocation(line: 5,
// CHECK: {{^}}[[variable_p]] = !MDLocation(line: 6, // CHECK: {{^}}[[variable_p]] = !DILocation(line: 6,

View File

@ -1,5 +1,5 @@
// RUN: %clang_cc1 -S -emit-llvm -g %s -o - | FileCheck %s // RUN: %clang_cc1 -S -emit-llvm -g %s -o - | FileCheck %s
// CHECK: !MDGlobalVariable( // CHECK: !DIGlobalVariable(
static const unsigned int ro = 201; static const unsigned int ro = 201;
void bar(int); void bar(int);

View File

@ -1,9 +1,9 @@
// RUN: %clang_cc1 -x c++ -g -emit-llvm -triple x86_64-linux-gnu -o - %s | FileCheck %s // RUN: %clang_cc1 -x c++ -g -emit-llvm -triple x86_64-linux-gnu -o - %s | FileCheck %s
// PR23332 // PR23332
// CHECK: MDLocalVariable(tag: DW_TAG_arg_variable, arg: 255 // CHECK: DILocalVariable(tag: DW_TAG_arg_variable, arg: 255
// CHECK: MDLocalVariable(tag: DW_TAG_arg_variable, arg: 256 // CHECK: DILocalVariable(tag: DW_TAG_arg_variable, arg: 256
// CHECK: MDLocalVariable(tag: DW_TAG_arg_variable, arg: 257 // CHECK: DILocalVariable(tag: DW_TAG_arg_variable, arg: 257
void fn1(int, int, int, int, int, int, int, int, int, int, int, int, int, int, void fn1(int, int, int, int, int, int, int, int, int, int, int, int, int, int,
int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int,
int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int,

View File

@ -2,7 +2,7 @@
int somefunc(char *x, int y, double z) { int somefunc(char *x, int y, double z) {
// CHECK: !MDSubroutineType(types: ![[NUM:[0-9]+]]) // CHECK: !DISubroutineType(types: ![[NUM:[0-9]+]])
// CHECK: ![[NUM]] = {{!{![^,]*, ![^,]*, ![^,]*, ![^,]*}}} // CHECK: ![[NUM]] = {{!{![^,]*, ![^,]*, ![^,]*, ![^,]*}}}
return y; return y;

View File

@ -9,8 +9,8 @@
int main() int main()
{ {
// CHECK: [[ASSIGNMENT]] = !MDLocation(line: [[@LINE+2]], // CHECK: [[ASSIGNMENT]] = !DILocation(line: [[@LINE+2]],
// CHECK: [[BLOCK_ENTRY]] = !MDLocation(line: [[@LINE+1]], // CHECK: [[BLOCK_ENTRY]] = !DILocation(line: [[@LINE+1]],
int (^blockptr)(void) = ^(void) { int (^blockptr)(void) = ^(void) {
return 0; return 0;
}; };

View File

@ -11,8 +11,8 @@
// out of order or not at all (the latter would occur if they were both assigned // out of order or not at all (the latter would occur if they were both assigned
// the same argument number by mistake). // the same argument number by mistake).
// CHECK: !MDLocalVariable(tag: DW_TAG_arg_variable, name: ".block_descriptor", arg: 1,{{.*}}line: 2, // CHECK: !DILocalVariable(tag: DW_TAG_arg_variable, name: ".block_descriptor", arg: 1,{{.*}}line: 2,
// CHECK: !MDLocalVariable(tag: DW_TAG_arg_variable, name: "param", arg: 2,{{.*}}line: 2, // CHECK: !DILocalVariable(tag: DW_TAG_arg_variable, name: "param", arg: 2,{{.*}}line: 2,
// Line directive so we don't have to worry about how many lines preceed the // Line directive so we don't have to worry about how many lines preceed the
// test code (as the line number is mangled in with the argument number as shown // test code (as the line number is mangled in with the argument number as shown

View File

@ -2,8 +2,8 @@
// Verify that the desired debugging type is generated for a structure // Verify that the desired debugging type is generated for a structure
// member that is a pointer to a block. // member that is a pointer to a block.
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "__block_literal_generic" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "__block_literal_generic"
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "__block_descriptor" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "__block_descriptor"
struct inStruct { struct inStruct {
void (^genericBlockPtr)(); void (^genericBlockPtr)();
} is; } is;

View File

@ -1,9 +1,9 @@
// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s // RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "e" // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "e"
// CHECK-SAME: elements: [[TEST3_ENUMS:![0-9]*]] // CHECK-SAME: elements: [[TEST3_ENUMS:![0-9]*]]
// CHECK: [[TEST3_ENUMS]] = !{[[TEST3_E:![0-9]*]]} // CHECK: [[TEST3_ENUMS]] = !{[[TEST3_E:![0-9]*]]}
// CHECK: [[TEST3_E]] = !MDEnumerator(name: "E", value: -1) // CHECK: [[TEST3_E]] = !DIEnumerator(name: "E", value: -1)
enum e; enum e;
void func(enum e *p) { void func(enum e *p) {

View File

@ -14,9 +14,9 @@ int foo() {
return i + j; return i + j;
} }
// CHECK-NOT: !MDLexicalBlock // CHECK-NOT: !DILexicalBlock
// CHECK: !MDLexicalBlockFile({{.*}}file: ![[MH:[0-9]+]] // CHECK: !DILexicalBlockFile({{.*}}file: ![[MH:[0-9]+]]
// CHECK: !MDFile(filename: "m.h" // CHECK: !DIFile(filename: "m.h"
// CHECK: !MDLexicalBlockFile({{.*}}file: ![[MC:[0-9]+]] // CHECK: !DILexicalBlockFile({{.*}}file: ![[MC:[0-9]+]]
// CHECK: !MDFile(filename: "m.c" // CHECK: !DIFile(filename: "m.c"
// CHECK-NOT: !MDLexicalBlock // CHECK-NOT: !DILexicalBlock

View File

@ -8,6 +8,6 @@ int main() {
} }
// CHECK: !llvm.dbg.cu = !{!0} // CHECK: !llvm.dbg.cu = !{!0}
// CHECK: !MDCompileUnit( // CHECK: !DICompileUnit(
// CHECK: !MDSubprogram( // CHECK: !DISubprogram(
// CHECK: !MDFile( // CHECK: !DIFile(

View File

@ -3,7 +3,7 @@
// Ensure we emit the full definition of 'foo' even though only its declaration // Ensure we emit the full definition of 'foo' even though only its declaration
// is needed, since C has no ODR to ensure that the definition will be the same // is needed, since C has no ODR to ensure that the definition will be the same
// in whatever TU actually uses/requires the definition of 'foo'. // in whatever TU actually uses/requires the definition of 'foo'.
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo", // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo",
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}

View File

@ -8,4 +8,4 @@ int f1(int a, int b) {
b; b;
} }
// CHECK: [[DBG_F1]] = !MDLocation(line: 100, // CHECK: [[DBG_F1]] = !DILocation(line: 100,

View File

@ -13,4 +13,4 @@ void func(char c, char* d)
} }
// CHECK: ret void, !dbg [[LINE:.*]] // CHECK: ret void, !dbg [[LINE:.*]]
// CHECK: [[LINE]] = !MDLocation(line: 6, // CHECK: [[LINE]] = !DILocation(line: 6,

View File

@ -8,4 +8,4 @@ int foo(int a, int b) { int c = a + b;
} }
// Without column information we wouldn't change locations for b. // Without column information we wouldn't change locations for b.
// CHECK: !MDLocation(line: 4, column: 20, // CHECK: !DILocation(line: 4, column: 20,

View File

@ -2,6 +2,6 @@
// Here two temporary nodes are identical (but should not get uniqued) while // Here two temporary nodes are identical (but should not get uniqued) while
// building the full debug type. // building the full debug type.
typedef struct { long x; } foo; typedef struct { foo *x; } bar; typedef struct { long x; } foo; typedef struct { foo *x; } bar;
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type,{{.*}} line: 4, size: 64, // CHECK: !DICompositeType(tag: DW_TAG_structure_type,{{.*}} line: 4, size: 64,
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type,{{.*}} line: 4, size: 64, // CHECK: !DICompositeType(tag: DW_TAG_structure_type,{{.*}} line: 4, size: 64,
bar b; bar b;

View File

@ -5,10 +5,10 @@
// CHECK: ret void, !dbg [[F1_LINE:![0-9]*]] // CHECK: ret void, !dbg [[F1_LINE:![0-9]*]]
// CHECK: ret void, !dbg [[F2_LINE:![0-9]*]] // CHECK: ret void, !dbg [[F2_LINE:![0-9]*]]
// CHECK: [[F1:![0-9]*]] = !MDSubprogram(name: "f1",{{.*}} isDefinition: true // CHECK: [[F1:![0-9]*]] = !DISubprogram(name: "f1",{{.*}} isDefinition: true
// CHECK: [[F2:![0-9]*]] = !MDSubprogram(name: "f2",{{.*}} isDefinition: true // CHECK: [[F2:![0-9]*]] = !DISubprogram(name: "f2",{{.*}} isDefinition: true
// CHECK: [[F1_LINE]] = !MDLocation({{.*}}, scope: [[F1]]) // CHECK: [[F1_LINE]] = !DILocation({{.*}}, scope: [[F1]])
// CHECK: [[F2_LINE]] = !MDLocation({{.*}}, scope: [[F2]]) // CHECK: [[F2_LINE]] = !DILocation({{.*}}, scope: [[F2]])
void f1() { void f1() {
} }

View File

@ -5,23 +5,23 @@
int main() { int main() {
int j = 0; int j = 0;
int k = 0; int k = 0;
// CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable, name: "i" // CHECK: !DILocalVariable(tag: DW_TAG_auto_variable, name: "i"
// CHECK-NEXT: !MDLexicalBlock( // CHECK-NEXT: !DILexicalBlock(
// FIXME: Looks like we don't actually need both these lexical blocks (disc 2 // FIXME: Looks like we don't actually need both these lexical blocks (disc 2
// just refers to disc 1, nothing actually uses disc 2). // just refers to disc 1, nothing actually uses disc 2).
// GMLT-NOT: !MDLexicalBlock // GMLT-NOT: !DILexicalBlock
// GMLT: !MDLexicalBlockFile({{.*}}, discriminator: 2) // GMLT: !DILexicalBlockFile({{.*}}, discriminator: 2)
// GMLT-NOT: !MDLexicalBlock // GMLT-NOT: !DILexicalBlock
// GMLT: !MDLexicalBlockFile({{.*}}, discriminator: 1) // GMLT: !DILexicalBlockFile({{.*}}, discriminator: 1)
// Make sure we don't have any more lexical blocks because we don't need them in // Make sure we don't have any more lexical blocks because we don't need them in
// -gmlt. // -gmlt.
// GMLT-NOT: !MDLexicalBlock // GMLT-NOT: !DILexicalBlock
for (int i = 0; i < 10; i++) for (int i = 0; i < 10; i++)
j++; j++;
// CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable, name: "i" // CHECK: !DILocalVariable(tag: DW_TAG_auto_variable, name: "i"
// CHECK-NEXT: !MDLexicalBlock( // CHECK-NEXT: !DILexicalBlock(
// GMLT-NOT: !MDLexicalBlock // GMLT-NOT: !DILexicalBlock
for (int i = 0; i < 10; i++) for (int i = 0; i < 10; i++)
k++; k++;
return 0; return 0;

View File

@ -1,6 +1,6 @@
// RUN: %clang_cc1 -g -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -g -emit-llvm -o - %s | FileCheck %s
// CHECK: !MDGlobalVariable({{.*}}variable: i32* @f.xyzzy // CHECK: !DIGlobalVariable({{.*}}variable: i32* @f.xyzzy
void f(void) void f(void)
{ {
static int xyzzy; static int xyzzy;

View File

@ -7,5 +7,5 @@ typedef int MyType;
MyType a; MyType a;
// CHECK: !MDDerivedType(tag: DW_TAG_typedef, name: "MyType", file: ![[HEADER:[0-9]+]], line: 2, // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "MyType", file: ![[HEADER:[0-9]+]], line: 2,
// CHECK: ![[HEADER]] = !MDFile(filename: "b.h", // CHECK: ![[HEADER]] = !DIFile(filename: "b.h",

View File

@ -4,8 +4,8 @@ typedef int v4si __attribute__((__vector_size__(16)));
v4si a; v4si a;
// Test that we get an array type that's also a vector out of debug. // Test that we get an array type that's also a vector out of debug.
// CHECK: !MDCompositeType(tag: DW_TAG_array_type, // CHECK: !DICompositeType(tag: DW_TAG_array_type,
// CHECK-SAME: baseType: ![[INT:[0-9]+]] // CHECK-SAME: baseType: ![[INT:[0-9]+]]
// CHECK-SAME: size: 128, align: 128 // CHECK-SAME: size: 128, align: 128
// CHECK-SAME: DIFlagVector // CHECK-SAME: DIFlagVector
// CHECK: ![[INT]] = !MDBasicType(name: "int" // CHECK: ![[INT]] = !DIBasicType(name: "int"

View File

@ -4,8 +4,8 @@ void testVLAwithSize(int s)
{ {
// CHECK: dbg.declare // CHECK: dbg.declare
// CHECK: dbg.declare({{.*}}, metadata ![[VAR:.*]], metadata ![[EXPR:.*]]) // CHECK: dbg.declare({{.*}}, metadata ![[VAR:.*]], metadata ![[EXPR:.*]])
// CHECK: ![[VAR]] = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "vla",{{.*}} line: [[@LINE+2]] // CHECK: ![[VAR]] = !DILocalVariable(tag: DW_TAG_auto_variable, name: "vla",{{.*}} line: [[@LINE+2]]
// CHECK: ![[EXPR]] = !MDExpression(DW_OP_deref) // CHECK: ![[EXPR]] = !DIExpression(DW_OP_deref)
int vla[s]; int vla[s];
int i; int i;
for (i = 0; i < s; i++) { for (i = 0; i < s; i++) {

View File

@ -42,7 +42,7 @@ struct foo2 foo2;
// Radar 7325611 // Radar 7325611
// CHECK: !MDDerivedType(tag: DW_TAG_typedef, name: "barfoo" // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "barfoo"
typedef int barfoo; typedef int barfoo;
barfoo foo() { barfoo foo() {
} }

View File

@ -8,6 +8,6 @@ extern int x;
int f() { int f() {
int *p = &x; int *p = &x;
// CHECK: ret i32 %{{.*}}, !dbg [[DI:![0-9]*]] // CHECK: ret i32 %{{.*}}, !dbg [[DI:![0-9]*]]
// CHECK: [[DI]] = !MDLocation(line: [[@LINE+1]] // CHECK: [[DI]] = !DILocation(line: [[@LINE+1]]
return *p; return *p;
} }

View File

@ -25,5 +25,5 @@ int test(int a, int b) {
return res; return res;
// CHECK: ret i32 %{{.*}}, !dbg [[DI:![0-9]+]] // CHECK: ret i32 %{{.*}}, !dbg [[DI:![0-9]+]]
// CHECK: [[DI]] = !MDLocation(line: [[@LINE-2]] // CHECK: [[DI]] = !DILocation(line: [[@LINE-2]]
} }

View File

@ -1,7 +1,7 @@
// RUN: echo "#include <stddef.h>" > %t.h // RUN: echo "#include <stddef.h>" > %t.h
// RUN: %clang_cc1 -S -g -include %t.h %s -emit-llvm -o - | FileCheck %s // RUN: %clang_cc1 -S -g -include %t.h %s -emit-llvm -o - | FileCheck %s
// CHECK: !MDGlobalVariable(name: "outer", // CHECK: !DIGlobalVariable(name: "outer",
// CHECK-NOT: linkageName: // CHECK-NOT: linkageName:
// CHECK-SAME: line: [[@LINE+2]] // CHECK-SAME: line: [[@LINE+2]]
// CHECK-SAME: isDefinition: true // CHECK-SAME: isDefinition: true

View File

@ -11,7 +11,7 @@
void foo(char c) void foo(char c)
{ {
int i; int i;
// CHECK: ![[CONV]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}}) // CHECK: ![[CONV]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
i = c; i = c;
// CHECK: ![[RET]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}}) // CHECK: ![[RET]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
} }

View File

@ -1,10 +1,10 @@
// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s // RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
// Require the template function declaration refer to the correct filename. // Require the template function declaration refer to the correct filename.
// First, locate the function decl in metadata, and pluck out the file handle: // First, locate the function decl in metadata, and pluck out the file handle:
// CHECK: !MDSubprogram(name: "extract_dwarf_data_from_header // CHECK: !DISubprogram(name: "extract_dwarf_data_from_header
// CHECK-SAME: file: [[FILE:![0-9]+]] // CHECK-SAME: file: [[FILE:![0-9]+]]
// Second: Require that filehandle refer to the correct filename: // Second: Require that filehandle refer to the correct filename:
// CHECK: [[FILE]] = !MDFile(filename: "decl_should_be_here.hpp" // CHECK: [[FILE]] = !DIFile(filename: "decl_should_be_here.hpp"
typedef long unsigned int __darwin_size_t; typedef long unsigned int __darwin_size_t;
typedef __darwin_size_t size_t; typedef __darwin_size_t size_t;
typedef unsigned char uint8_t; typedef unsigned char uint8_t;

View File

@ -1,5 +1,5 @@
// CHECK-DAG: !MDCompositeType(tag: DW_TAG_structure_type, name: "PR16214",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true // CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "PR16214",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true
struct PR16214 { struct PR16214 {
int i; int i;
}; };
@ -10,7 +10,7 @@ bar *a;
bar b; bar b;
namespace PR14467 { namespace PR14467 {
// CHECK-DAG: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true // CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "foo",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true
struct foo { struct foo {
}; };
@ -21,7 +21,7 @@ foo *bar(foo *a) {
} }
namespace test1 { namespace test1 {
// CHECK-DAG: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true // CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "foo",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true
struct foo { struct foo {
}; };
@ -35,7 +35,7 @@ namespace test2 {
// FIXME: if we were a bit fancier, we could realize that the 'foo' type is only // FIXME: if we were a bit fancier, we could realize that the 'foo' type is only
// required because of the 'bar' type which is not required at all (or might // required because of the 'bar' type which is not required at all (or might
// only be required to be declared) // only be required to be declared)
// CHECK-DAG: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true // CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "foo",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true
struct foo { struct foo {
}; };

View File

@ -6,9 +6,9 @@ struct C {
extern bool b; extern bool b;
// CHECK: call {{.*}}, !dbg [[DTOR_CALL1_LOC:![0-9]*]] // CHECK: call {{.*}}, !dbg [[DTOR_CALL1_LOC:![0-9]*]]
// CHECK: call {{.*}}, !dbg [[DTOR_CALL2_LOC:![0-9]*]] // CHECK: call {{.*}}, !dbg [[DTOR_CALL2_LOC:![0-9]*]]
// CHECK: [[FUN1:.*]] = !MDSubprogram(name: "fun1",{{.*}} isDefinition: true // CHECK: [[FUN1:.*]] = !DISubprogram(name: "fun1",{{.*}} isDefinition: true
// CHECK: [[FUN2:.*]] = !MDSubprogram(name: "fun2",{{.*}} isDefinition: true // CHECK: [[FUN2:.*]] = !DISubprogram(name: "fun2",{{.*}} isDefinition: true
// CHECK: [[DTOR_CALL1_LOC]] = !MDLocation(line: [[@LINE+1]], scope: [[FUN1]]) // CHECK: [[DTOR_CALL1_LOC]] = !DILocation(line: [[@LINE+1]], scope: [[FUN1]])
void fun1() { b && (C(), 1); } void fun1() { b && (C(), 1); }
// CHECK: [[DTOR_CALL2_LOC]] = !MDLocation(line: [[@LINE+1]], scope: [[FUN2]]) // CHECK: [[DTOR_CALL2_LOC]] = !DILocation(line: [[@LINE+1]], scope: [[FUN2]])
bool fun2() { return (C(), b) && 0; } bool fun2() { return (C(), b) && 0; }

View File

@ -3,7 +3,7 @@
extern "C" void test_name1() {} extern "C" void test_name1() {}
void test_name2() {} void test_name2() {}
// CHECK: !MDSubprogram(name: "test_name1", // CHECK: !DISubprogram(name: "test_name1",
// CHECK-NOT: linkageName: // CHECK-NOT: linkageName:
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
// CHECK: !MDSubprogram(name: "test_name2", linkageName: "_Z10test_name2v" // CHECK: !DISubprogram(name: "test_name2", linkageName: "_Z10test_name2v"

View File

@ -1,37 +1,37 @@
// RUN: %clang_cc1 -emit-llvm -g -triple %itanium_abi_triple %s -o - | FileCheck %s // RUN: %clang_cc1 -emit-llvm -g -triple %itanium_abi_triple %s -o - | FileCheck %s
// Test the various accessibility flags in the debug info. // Test the various accessibility flags in the debug info.
struct A { struct A {
// CHECK-DAG: !MDSubprogram(name: "pub_default",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrototyped, // CHECK-DAG: !DISubprogram(name: "pub_default",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrototyped,
void pub_default(); void pub_default();
// CHECK-DAG: !MDDerivedType(tag: DW_TAG_member, name: "pub_default_static",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagStaticMember) // CHECK-DAG: !DIDerivedType(tag: DW_TAG_member, name: "pub_default_static",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagStaticMember)
static int pub_default_static; static int pub_default_static;
}; };
// CHECK: !MDDerivedType(tag: DW_TAG_inheritance,{{.*}} baseType: !"_ZTS1A",{{.*}} flags: DIFlagPublic) // CHECK: !DIDerivedType(tag: DW_TAG_inheritance,{{.*}} baseType: !"_ZTS1A",{{.*}} flags: DIFlagPublic)
class B : public A { class B : public A {
public: public:
// CHECK-DAG: !MDSubprogram(name: "pub",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPublic | DIFlagPrototyped, // CHECK-DAG: !DISubprogram(name: "pub",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPublic | DIFlagPrototyped,
void pub(); void pub();
// CHECK-DAG: !MDDerivedType(tag: DW_TAG_member, name: "public_static",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPublic | DIFlagStaticMember) // CHECK-DAG: !DIDerivedType(tag: DW_TAG_member, name: "public_static",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPublic | DIFlagStaticMember)
static int public_static; static int public_static;
protected: protected:
// CHECK: !MDSubprogram(name: "prot",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagProtected | DIFlagPrototyped, // CHECK: !DISubprogram(name: "prot",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagProtected | DIFlagPrototyped,
void prot(); void prot();
private: private:
// CHECK: !MDSubprogram(name: "priv_default",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrototyped, // CHECK: !DISubprogram(name: "priv_default",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrototyped,
void priv_default(); void priv_default();
}; };
union U { union U {
// CHECK-DAG: !MDSubprogram(name: "union_pub_default",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrototyped, // CHECK-DAG: !DISubprogram(name: "union_pub_default",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrototyped,
void union_pub_default(); void union_pub_default();
private: private:
// CHECK-DAG: !MDDerivedType(tag: DW_TAG_member, name: "union_priv",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrivate) // CHECK-DAG: !DIDerivedType(tag: DW_TAG_member, name: "union_priv",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrivate)
int union_priv; int union_priv;
}; };
// CHECK: !MDSubprogram(name: "free", // CHECK: !DISubprogram(name: "free",
// CHECK-SAME: isDefinition: true // CHECK-SAME: isDefinition: true
// CHECK-SAME: flags: DIFlagPrototyped, // CHECK-SAME: flags: DIFlagPrototyped,
void free() {} void free() {}

View File

@ -13,27 +13,27 @@ bar
= foo<T*>; = foo<T*>;
} }
// CHECK: !MDGlobalVariable(name: "bi",{{.*}} type: [[BINT:![0-9]+]] // CHECK: !DIGlobalVariable(name: "bi",{{.*}} type: [[BINT:![0-9]+]]
// CHECK: [[BINT]] = !MDDerivedType(tag: DW_TAG_typedef, name: "bar<int>" // CHECK: [[BINT]] = !DIDerivedType(tag: DW_TAG_typedef, name: "bar<int>"
// CHECK-SAME: line: 42, // CHECK-SAME: line: 42,
x::bar<int> bi; x::bar<int> bi;
// CHECK: !MDGlobalVariable(name: "bf",{{.*}} type: [[BFLOAT:![0-9]+]] // CHECK: !DIGlobalVariable(name: "bf",{{.*}} type: [[BFLOAT:![0-9]+]]
// CHECK: [[BFLOAT]] = !MDDerivedType(tag: DW_TAG_typedef, name: "bar<float>" // CHECK: [[BFLOAT]] = !DIDerivedType(tag: DW_TAG_typedef, name: "bar<float>"
x::bar<float> bf; x::bar<float> bf;
using using
// CHECK: !MDGlobalVariable(name: "n",{{.*}} type: [[NARF:![0-9]+]] // CHECK: !DIGlobalVariable(name: "n",{{.*}} type: [[NARF:![0-9]+]]
# 142 # 142
narf // CHECK: [[NARF]] = !MDDerivedType(tag: DW_TAG_typedef, name: "narf" narf // CHECK: [[NARF]] = !DIDerivedType(tag: DW_TAG_typedef, name: "narf"
// CHECK-SAME: line: 142 // CHECK-SAME: line: 142
= int; = int;
narf n; narf n;
template <typename T> template <typename T>
using tv = void; using tv = void;
// CHECK: !MDDerivedType(tag: DW_TAG_typedef, name: "tv<int>" // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "tv<int>"
tv<int> *tvp; tv<int> *tvp;
using v = void; using v = void;
// CHECK: !MDDerivedType(tag: DW_TAG_typedef, name: "v" // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "v"
v *vp; v *vp;

View File

@ -21,8 +21,8 @@ int test_it() {
return (c == 1); return (c == 1);
} }
// CHECK: [[FILE:.*]] = !MDFile(filename: "{{.*}}debug-info-anon-union-vars.cpp", // CHECK: [[FILE:.*]] = !DIFile(filename: "{{.*}}debug-info-anon-union-vars.cpp",
// CHECK: !MDGlobalVariable(name: "c",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true // CHECK: !DIGlobalVariable(name: "c",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true
// CHECK: !MDGlobalVariable(name: "d",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true // CHECK: !DIGlobalVariable(name: "d",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true
// CHECK: !MDGlobalVariable(name: "a",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true // CHECK: !DIGlobalVariable(name: "a",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true
// CHECK: !MDGlobalVariable(name: "b",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true // CHECK: !DIGlobalVariable(name: "b",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true

View File

@ -22,12 +22,12 @@ int main(int argc, char **argv) {
A reallyA (500); A reallyA (500);
} }
// CHECK: ![[CLASSTYPE:.*]] = !MDCompositeType(tag: DW_TAG_class_type, name: "A", // CHECK: ![[CLASSTYPE:.*]] = !DICompositeType(tag: DW_TAG_class_type, name: "A",
// CHECK-SAME: identifier: "_ZTS1A" // CHECK-SAME: identifier: "_ZTS1A"
// CHECK: ![[ARTARG:.*]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1A", // CHECK: ![[ARTARG:.*]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1A",
// CHECK-SAME: DIFlagArtificial // CHECK-SAME: DIFlagArtificial
// CHECK: !MDSubprogram(name: "A", scope: !"_ZTS1A" // CHECK: !DISubprogram(name: "A", scope: !"_ZTS1A"
// CHECK-SAME: line: 12 // CHECK-SAME: line: 12
// CHECK-SAME: DIFlagPublic // CHECK-SAME: DIFlagPublic
// CHECK: !MDSubroutineType(types: [[FUNCTYPE:![0-9]*]]) // CHECK: !DISubroutineType(types: [[FUNCTYPE:![0-9]*]])
// CHECK: [[FUNCTYPE]] = !{null, ![[ARTARG]], !{{.*}}, !{{.*}}} // CHECK: [[FUNCTYPE]] = !{null, ![[ARTARG]], !{{.*}}, !{{.*}}}

View File

@ -10,9 +10,9 @@ void test() {
__block A a; __block A a;
} }
// CHECK: !MDSubprogram(name: "__Block_byref_object_copy_", // CHECK: !DISubprogram(name: "__Block_byref_object_copy_",
// CHECK-SAME: line: 10, // CHECK-SAME: line: 10,
// CHECK-SAME: isLocal: true, isDefinition: true // CHECK-SAME: isLocal: true, isDefinition: true
// CHECK: !MDSubprogram(name: "__Block_byref_object_dispose_", // CHECK: !DISubprogram(name: "__Block_byref_object_dispose_",
// CHECK-SAME: line: 10, // CHECK-SAME: line: 10,
// CHECK-SAME: isLocal: true, isDefinition: true // CHECK-SAME: isLocal: true, isDefinition: true

View File

@ -3,5 +3,5 @@
// 16 is DW_ATE_UTF (0x10) encoding attribute. // 16 is DW_ATE_UTF (0x10) encoding attribute.
char16_t char_a = u'h'; char16_t char_a = u'h';
// CHECK: !{{.*}} = !MDBasicType(name: "char16_t" // CHECK: !{{.*}} = !DIBasicType(name: "char16_t"
// CHECK-SAME: encoding: DW_ATE_UTF) // CHECK-SAME: encoding: DW_ATE_UTF)

View File

@ -6,7 +6,7 @@ namespace rdar14101097_1 { // see also PR16214
// Check that we emit debug info for the definition of a struct if the // Check that we emit debug info for the definition of a struct if the
// definition is available, even if it's used via a pointer wrapped in a // definition is available, even if it's used via a pointer wrapped in a
// typedef. // typedef.
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
struct foo { struct foo {
@ -23,7 +23,7 @@ namespace rdar14101097_2 {
// As above, except trickier because we first encounter only a declaration of // As above, except trickier because we first encounter only a declaration of
// the type and no debug-info related use after we see the definition of the // the type and no debug-info related use after we see the definition of the
// type. // type.
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
struct foo; struct foo;

View File

@ -90,63 +90,63 @@ int main(int argc, char **argv) {
// CHECK: invoke {{.+}} @_ZN1BD1Ev(%class.B* %b) // CHECK: invoke {{.+}} @_ZN1BD1Ev(%class.B* %b)
// CHECK-NEXT: unwind label %{{.+}}, !dbg ![[EXCEPTLOC:.*]] // CHECK-NEXT: unwind label %{{.+}}, !dbg ![[EXCEPTLOC:.*]]
// CHECK: store i32 0, i32* %{{.+}}, !dbg ![[RETLOC:.*]] // CHECK: store i32 0, i32* %{{.+}}, !dbg ![[RETLOC:.*]]
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
// CHECK: !MDCompositeType(tag: DW_TAG_class_type, name: "bar" // CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "bar"
// CHECK: !MDCompositeType(tag: DW_TAG_union_type, name: "baz" // CHECK: !DICompositeType(tag: DW_TAG_union_type, name: "baz"
// CHECK: !MDCompositeType(tag: DW_TAG_class_type, name: "B" // CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "B"
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "_vptr$B", // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "_vptr$B",
// CHECK-SAME: DIFlagArtificial // CHECK-SAME: DIFlagArtificial
// CHECK: ![[INT:[0-9]+]] = !MDBasicType(name: "int" // CHECK: ![[INT:[0-9]+]] = !DIBasicType(name: "int"
// CHECK: [[C:![0-9]*]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "C", // CHECK: [[C:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "C",
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: elements: [[C_MEM:![0-9]*]] // CHECK-SAME: elements: [[C_MEM:![0-9]*]]
// CHECK-SAME: vtableHolder: !"_ZTS1C" // CHECK-SAME: vtableHolder: !"_ZTS1C"
// CHECK-SAME: identifier: "_ZTS1C" // CHECK-SAME: identifier: "_ZTS1C"
// CHECK: [[C_MEM]] = !{[[C_VPTR:![0-9]*]], [[C_S:![0-9]*]], [[C_DTOR:![0-9]*]]} // CHECK: [[C_MEM]] = !{[[C_VPTR:![0-9]*]], [[C_S:![0-9]*]], [[C_DTOR:![0-9]*]]}
// CHECK: [[C_VPTR]] = !MDDerivedType(tag: DW_TAG_member, name: "_vptr$C" // CHECK: [[C_VPTR]] = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$C"
// CHECK-SAME: DIFlagArtificial // CHECK-SAME: DIFlagArtificial
// CHECK: [[C_S]] = !MDDerivedType(tag: DW_TAG_member, name: "s" // CHECK: [[C_S]] = !DIDerivedType(tag: DW_TAG_member, name: "s"
// CHECK-SAME: baseType: ![[INT]] // CHECK-SAME: baseType: ![[INT]]
// CHECK-SAME: DIFlagStaticMember // CHECK-SAME: DIFlagStaticMember
// CHECK: [[C_DTOR]] = !MDSubprogram(name: "~C" // CHECK: [[C_DTOR]] = !DISubprogram(name: "~C"
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "D" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "D"
// CHECK-SAME: DIFlagFwdDecl // CHECK-SAME: DIFlagFwdDecl
// CHECK-SAME: identifier: "_ZTS1D" // CHECK-SAME: identifier: "_ZTS1D"
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "E" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "E"
// CHECK-SAME: DIFlagFwdDecl // CHECK-SAME: DIFlagFwdDecl
// CHECK-SAME: identifier: "_ZTS1E" // CHECK-SAME: identifier: "_ZTS1E"
// CHECK: [[F:![0-9]*]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "F" // CHECK: [[F:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "F"
// CHECK-SAME: DIFlagFwdDecl // CHECK-SAME: DIFlagFwdDecl
// CHECK-SAME: identifier: "_ZTS1F" // CHECK-SAME: identifier: "_ZTS1F"
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "G" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "G"
// CHECK-SAME: DIFlagFwdDecl // CHECK-SAME: DIFlagFwdDecl
// CHECK-SAME: identifier: "_ZTS1G" // CHECK-SAME: identifier: "_ZTS1G"
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "inner" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "inner"
// CHECK: line: 50 // CHECK: line: 50
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: elements: [[G_INNER_MEM:![0-9]*]] // CHECK-SAME: elements: [[G_INNER_MEM:![0-9]*]]
// CHECK-SAME: identifier: "_ZTSN1G5innerE" // CHECK-SAME: identifier: "_ZTSN1G5innerE"
// CHECK: [[G_INNER_MEM]] = !{[[G_INNER_I:![0-9]*]]} // CHECK: [[G_INNER_MEM]] = !{[[G_INNER_I:![0-9]*]]}
// CHECK: [[G_INNER_I]] = !MDDerivedType(tag: DW_TAG_member, name: "j" // CHECK: [[G_INNER_I]] = !DIDerivedType(tag: DW_TAG_member, name: "j"
// CHECK-SAME: baseType: ![[INT]] // CHECK-SAME: baseType: ![[INT]]
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "A" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "A"
// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "HdrSize" // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "HdrSize"
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "I" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "I"
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
// //
// CHECK: !MDSubprogram(name: "func",{{.*}} scope: !"_ZTS1D" // CHECK: !DISubprogram(name: "func",{{.*}} scope: !"_ZTS1D"
// CHECK-SAME: isDefinition: true // CHECK-SAME: isDefinition: true
// CHECK-SAME: declaration: [[D_FUNC_DECL:![0-9]*]] // CHECK-SAME: declaration: [[D_FUNC_DECL:![0-9]*]]
// CHECK: [[D_FUNC_DECL]] = !MDSubprogram(name: "func",{{.*}} scope: !"_ZTS1D" // CHECK: [[D_FUNC_DECL]] = !DISubprogram(name: "func",{{.*}} scope: !"_ZTS1D"
// CHECK-SAME: isDefinition: false // CHECK-SAME: isDefinition: false
// CHECK: ![[EXCEPTLOC]] = !MDLocation(line: 84, // CHECK: ![[EXCEPTLOC]] = !DILocation(line: 84,
// CHECK: ![[RETLOC]] = !MDLocation(line: 83, // CHECK: ![[RETLOC]] = !DILocation(line: 83,

View File

@ -1,17 +1,17 @@
// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm-only -std=c++14 -emit-llvm -g %s -o - | FileCheck %s // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm-only -std=c++14 -emit-llvm -g %s -o - | FileCheck %s
// CHECK: [[EMPTY:![0-9]*]] = !{} // CHECK: [[EMPTY:![0-9]*]] = !{}
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo", // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo",
// CHECK-SAME: elements: [[EMPTY]] // CHECK-SAME: elements: [[EMPTY]]
// FIXME: The context of this definition should be the CU/file scope, not the class. // FIXME: The context of this definition should be the CU/file scope, not the class.
// CHECK: !MDSubprogram(name: "func", {{.*}} scope: !"_ZTS3foo" // CHECK: !DISubprogram(name: "func", {{.*}} scope: !"_ZTS3foo"
// CHECK-SAME: type: [[SUBROUTINE_TYPE:![0-9]*]] // CHECK-SAME: type: [[SUBROUTINE_TYPE:![0-9]*]]
// CHECK-SAME: isDefinition: true // CHECK-SAME: isDefinition: true
// CHECK-SAME: declaration: [[FUNC_DECL:![0-9]*]] // CHECK-SAME: declaration: [[FUNC_DECL:![0-9]*]]
// CHECK: [[SUBROUTINE_TYPE]] = !MDSubroutineType(types: [[TYPE_LIST:![0-9]*]]) // CHECK: [[SUBROUTINE_TYPE]] = !DISubroutineType(types: [[TYPE_LIST:![0-9]*]])
// CHECK: [[TYPE_LIST]] = !{[[INT:![0-9]*]]} // CHECK: [[TYPE_LIST]] = !{[[INT:![0-9]*]]}
// CHECK: [[INT]] = !MDBasicType(name: "int" // CHECK: [[INT]] = !DIBasicType(name: "int"
// CHECK: [[FUNC_DECL]] = !MDSubprogram(name: "func", // CHECK: [[FUNC_DECL]] = !DISubprogram(name: "func",
// CHECK-SAME: scope: !"_ZTS3foo" // CHECK-SAME: scope: !"_ZTS3foo"
// CHECK-SAME: type: [[SUBROUTINE_TYPE]] // CHECK-SAME: type: [[SUBROUTINE_TYPE]]
// CHECK-SAME: isDefinition: false // CHECK-SAME: isDefinition: false

View File

@ -17,13 +17,13 @@ class OuterClass
public: public:
InnerClass(); // Here createContextChain() generates a limited type for OuterClass. InnerClass(); // Here createContextChain() generates a limited type for OuterClass.
} theInnerClass; } theInnerClass;
// CHECK0: ![[DECL:[0-9]+]] = !MDSubprogram(name: "OuterClass" // CHECK0: ![[DECL:[0-9]+]] = !DISubprogram(name: "OuterClass"
// CHECK0-SAME: line: [[@LINE+2]] // CHECK0-SAME: line: [[@LINE+2]]
// CHECK0-SAME: isDefinition: false // CHECK0-SAME: isDefinition: false
OuterClass(const Foo *); // line 10 OuterClass(const Foo *); // line 10
}; };
OuterClass::InnerClass OuterClass::theInnerClass; // This toplevel decl causes InnerClass to be generated. OuterClass::InnerClass OuterClass::theInnerClass; // This toplevel decl causes InnerClass to be generated.
// CHECK0: !MDSubprogram(name: "OuterClass" // CHECK0: !DISubprogram(name: "OuterClass"
// CHECK0-SAME: line: [[@LINE+3]] // CHECK0-SAME: line: [[@LINE+3]]
// CHECK0-SAME: isDefinition: true // CHECK0-SAME: isDefinition: true
// CHECK0-SAME: declaration: ![[DECL]] // CHECK0-SAME: declaration: ![[DECL]]
@ -41,13 +41,13 @@ class OuterClass1
public: public:
InnerClass1(); InnerClass1();
} theInnerClass1; } theInnerClass1;
// CHECK1: ![[DECL:[0-9]+]] = !MDSubprogram(name: "Bar" // CHECK1: ![[DECL:[0-9]+]] = !DISubprogram(name: "Bar"
// CHECK1-SAME: line: [[@LINE+2]] // CHECK1-SAME: line: [[@LINE+2]]
// CHECK1-SAME: isDefinition: false // CHECK1-SAME: isDefinition: false
void Bar(const Foo1 *); void Bar(const Foo1 *);
}; };
OuterClass1::InnerClass1 OuterClass1::theInnerClass1; OuterClass1::InnerClass1 OuterClass1::theInnerClass1;
// CHECK1: !MDSubprogram(name: "Bar" // CHECK1: !DISubprogram(name: "Bar"
// CHECK1-SAME: line: [[@LINE+3]] // CHECK1-SAME: line: [[@LINE+3]]
// CHECK1-SAME: isDefinition: true // CHECK1-SAME: isDefinition: true
// CHECK1-SAME: declaration: ![[DECL]] // CHECK1-SAME: declaration: ![[DECL]]
@ -64,13 +64,13 @@ class OuterClass2
public: public:
InnerClass2(); InnerClass2();
} theInnerClass2; } theInnerClass2;
// CHECK2: ![[DECL:[0-9]+]] = !MDSubprogram(name: "~OuterClass2" // CHECK2: ![[DECL:[0-9]+]] = !DISubprogram(name: "~OuterClass2"
// CHECK2-SAME: line: [[@LINE+2]] // CHECK2-SAME: line: [[@LINE+2]]
// CHECK2-SAME: isDefinition: false // CHECK2-SAME: isDefinition: false
~OuterClass2(); // line 10 ~OuterClass2(); // line 10
}; };
OuterClass2::InnerClass2 OuterClass2::theInnerClass2; OuterClass2::InnerClass2 OuterClass2::theInnerClass2;
// CHECK4: !MDSubprogram(name: "~OuterClass2" // CHECK4: !DISubprogram(name: "~OuterClass2"
// CHECK4-SAME: line: [[@LINE+3]] // CHECK4-SAME: line: [[@LINE+3]]
// CHECK4-SAME: isDefinition: true // CHECK4-SAME: isDefinition: true
// CHECK4-SAME: declaration: ![[DECL]] // CHECK4-SAME: declaration: ![[DECL]]

View File

@ -19,6 +19,6 @@ protected:
Test t; Test t;
// CHECK: !MDDerivedType(tag: DW_TAG_pointer_type // CHECK: !DIDerivedType(tag: DW_TAG_pointer_type
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "data" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "data"
// CHECK-NOT: !MDCompositeType(tag: DW_TAG_structure_type, name: "data" // CHECK-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "data"

View File

@ -9,23 +9,23 @@ B b;
C c; C c;
D d; D d;
// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "A" // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "A"
// CHECK-SAME: line: 3 // CHECK-SAME: line: 3
// CHECK-SAME: baseType: ![[INT:[0-9]+]] // CHECK-SAME: baseType: ![[INT:[0-9]+]]
// CHECK-SAME: size: 32, align: 32 // CHECK-SAME: size: 32, align: 32
// CHECK-NOT: offset: // CHECK-NOT: offset:
// CHECK-NOT: flags: // CHECK-NOT: flags:
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
// CHECK: ![[INT]] = !MDBasicType(name: "int" // CHECK: ![[INT]] = !DIBasicType(name: "int"
// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "B" // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "B"
// CHECK-SAME: line: 4 // CHECK-SAME: line: 4
// CHECK-SAME: baseType: ![[ULONG:[0-9]+]] // CHECK-SAME: baseType: ![[ULONG:[0-9]+]]
// CHECK-SAME: size: 64, align: 64 // CHECK-SAME: size: 64, align: 64
// CHECK-NOT: offset: // CHECK-NOT: offset:
// CHECK-NOT: flags: // CHECK-NOT: flags:
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
// CHECK: ![[ULONG]] = !MDBasicType(name: "long unsigned int" // CHECK: ![[ULONG]] = !DIBasicType(name: "long unsigned int"
// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "C" // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "C"
// CHECK-SAME: line: 5 // CHECK-SAME: line: 5
// CHECK-NOT: baseType: // CHECK-NOT: baseType:
// CHECK-SAME: size: 32, align: 32 // CHECK-SAME: size: 32, align: 32
@ -49,13 +49,13 @@ namespace PR14029 {
namespace test2 { namespace test2 {
// FIXME: this should just be a declaration under -fno-standalone-debug // FIXME: this should just be a declaration under -fno-standalone-debug
// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "E" // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E"
// CHECK-SAME: scope: [[TEST2:![0-9]+]] // CHECK-SAME: scope: [[TEST2:![0-9]+]]
// CHECK-SAME: elements: [[TEST_ENUMS:![0-9]+]] // CHECK-SAME: elements: [[TEST_ENUMS:![0-9]+]]
// CHECK-SAME: identifier: "_ZTSN5test21EE" // CHECK-SAME: identifier: "_ZTSN5test21EE"
// CHECK: [[TEST2]] = !MDNamespace(name: "test2" // CHECK: [[TEST2]] = !DINamespace(name: "test2"
// CHECK: [[TEST_ENUMS]] = !{[[TEST_E:![0-9]*]]} // CHECK: [[TEST_ENUMS]] = !{[[TEST_E:![0-9]*]]}
// CHECK: [[TEST_E]] = !MDEnumerator(name: "e", value: 0) // CHECK: [[TEST_E]] = !DIEnumerator(name: "e", value: 0)
enum E : int; enum E : int;
void func(E *) { void func(E *) {
} }
@ -64,22 +64,22 @@ enum E : int { e };
namespace test3 { namespace test3 {
// FIXME: this should just be a declaration under -fno-standalone-debug // FIXME: this should just be a declaration under -fno-standalone-debug
// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "E" // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E"
// CHECK-SAME: scope: [[TEST3:![0-9]+]] // CHECK-SAME: scope: [[TEST3:![0-9]+]]
// CHECK-SAME: elements: [[TEST_ENUMS]] // CHECK-SAME: elements: [[TEST_ENUMS]]
// CHECK-SAME: identifier: "_ZTSN5test31EE" // CHECK-SAME: identifier: "_ZTSN5test31EE"
// CHECK: [[TEST3]] = !MDNamespace(name: "test3" // CHECK: [[TEST3]] = !DINamespace(name: "test3"
enum E : int { e }; enum E : int { e };
void func(E *) { void func(E *) {
} }
} }
namespace test4 { namespace test4 {
// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "E" // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E"
// CHECK-SAME: scope: [[TEST4:![0-9]+]] // CHECK-SAME: scope: [[TEST4:![0-9]+]]
// CHECK-SAME: elements: [[TEST_ENUMS]] // CHECK-SAME: elements: [[TEST_ENUMS]]
// CHECK-SAME: identifier: "_ZTSN5test41EE" // CHECK-SAME: identifier: "_ZTSN5test41EE"
// CHECK: [[TEST4]] = !MDNamespace(name: "test4" // CHECK: [[TEST4]] = !DINamespace(name: "test4"
enum E : int; enum E : int;
void f1(E *) { void f1(E *) {
} }
@ -88,18 +88,18 @@ void f2(E) {
} }
} }
// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "D" // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "D"
// CHECK-SAME: line: 6 // CHECK-SAME: line: 6
// CHECK-SAME: size: 16, align: 16 // CHECK-SAME: size: 16, align: 16
// CHECK-NOT: offset: // CHECK-NOT: offset:
// CHECK-SAME: flags: DIFlagFwdDecl // CHECK-SAME: flags: DIFlagFwdDecl
namespace test5 { namespace test5 {
// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "E" // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E"
// CHECK-SAME: scope: [[TEST5:![0-9]+]] // CHECK-SAME: scope: [[TEST5:![0-9]+]]
// CHECK-SAME: flags: DIFlagFwdDecl // CHECK-SAME: flags: DIFlagFwdDecl
// CHECK-SAME: identifier: "_ZTSN5test51EE" // CHECK-SAME: identifier: "_ZTSN5test51EE"
// CHECK: [[TEST5]] = !MDNamespace(name: "test5" // CHECK: [[TEST5]] = !DINamespace(name: "test5"
enum E : int; enum E : int;
void f1(E *) { void f1(E *) {
} }

View File

@ -1,17 +1,17 @@
// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -g %s -o - | FileCheck %s // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -g %s -o - | FileCheck %s
// CHECK: !MDCompileUnit( // CHECK: !DICompileUnit(
// CHECK-SAME: enums: [[ENUMS:![0-9]*]] // CHECK-SAME: enums: [[ENUMS:![0-9]*]]
// CHECK: [[ENUMS]] = !{[[E1:![0-9]*]], [[E2:![0-9]*]], [[E3:![0-9]*]]} // CHECK: [[ENUMS]] = !{[[E1:![0-9]*]], [[E2:![0-9]*]], [[E3:![0-9]*]]}
namespace test1 { namespace test1 {
// CHECK: [[E1]] = !MDCompositeType(tag: DW_TAG_enumeration_type, name: "e" // CHECK: [[E1]] = !DICompositeType(tag: DW_TAG_enumeration_type, name: "e"
// CHECK-SAME: scope: [[TEST1:![0-9]*]] // CHECK-SAME: scope: [[TEST1:![0-9]*]]
// CHECK-SAME: elements: [[TEST1_ENUMS:![0-9]*]] // CHECK-SAME: elements: [[TEST1_ENUMS:![0-9]*]]
// CHECK-SAME: identifier: "_ZTSN5test11eE" // CHECK-SAME: identifier: "_ZTSN5test11eE"
// CHECK: [[TEST1]] = !MDNamespace(name: "test1" // CHECK: [[TEST1]] = !DINamespace(name: "test1"
// CHECK: [[TEST1_ENUMS]] = !{[[TEST1_E:![0-9]*]]} // CHECK: [[TEST1_ENUMS]] = !{[[TEST1_E:![0-9]*]]}
// CHECK: [[TEST1_E]] = !MDEnumerator(name: "E", value: 0) // CHECK: [[TEST1_E]] = !DIEnumerator(name: "E", value: 0)
enum e { E }; enum e { E };
void foo() { void foo() {
int v = E; int v = E;
@ -20,11 +20,11 @@ void foo() {
namespace test2 { namespace test2 {
// rdar://8195980 // rdar://8195980
// CHECK: [[E2]] = !MDCompositeType(tag: DW_TAG_enumeration_type, name: "e" // CHECK: [[E2]] = !DICompositeType(tag: DW_TAG_enumeration_type, name: "e"
// CHECK-SAME: scope: [[TEST2:![0-9]+]] // CHECK-SAME: scope: [[TEST2:![0-9]+]]
// CHECK-SAME: elements: [[TEST1_ENUMS]] // CHECK-SAME: elements: [[TEST1_ENUMS]]
// CHECK-SAME: identifier: "_ZTSN5test21eE" // CHECK-SAME: identifier: "_ZTSN5test21eE"
// CHECK: [[TEST2]] = !MDNamespace(name: "test2" // CHECK: [[TEST2]] = !DINamespace(name: "test2"
enum e { E }; enum e { E };
bool func(int i) { bool func(int i) {
return i == E; return i == E;
@ -32,13 +32,13 @@ bool func(int i) {
} }
namespace test3 { namespace test3 {
// CHECK: [[E3]] = !MDCompositeType(tag: DW_TAG_enumeration_type, name: "e" // CHECK: [[E3]] = !DICompositeType(tag: DW_TAG_enumeration_type, name: "e"
// CHECK-SAME: scope: [[TEST3:![0-9]*]] // CHECK-SAME: scope: [[TEST3:![0-9]*]]
// CHECK-SAME: elements: [[TEST3_ENUMS:![0-9]*]] // CHECK-SAME: elements: [[TEST3_ENUMS:![0-9]*]]
// CHECK-SAME: identifier: "_ZTSN5test31eE" // CHECK-SAME: identifier: "_ZTSN5test31eE"
// CHECK: [[TEST3]] = !MDNamespace(name: "test3" // CHECK: [[TEST3]] = !DINamespace(name: "test3"
// CHECK: [[TEST3_ENUMS]] = !{[[TEST3_E:![0-9]*]]} // CHECK: [[TEST3_ENUMS]] = !{[[TEST3_E:![0-9]*]]}
// CHECK: [[TEST3_E]] = !MDEnumerator(name: "E", value: -1) // CHECK: [[TEST3_E]] = !DIEnumerator(name: "E", value: -1)
enum e { E = -1 }; enum e { E = -1 };
void func() { void func() {
e x; e x;

View File

@ -1,6 +1,6 @@
// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s // RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
// CHECK: !MDSubrange(count: -1) // CHECK: !DISubrange(count: -1)
struct StructName { struct StructName {
int member[]; int member[];

View File

@ -10,6 +10,6 @@ T fx(XF<T> xi) {
return xi.member; return xi.member;
} }
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "XF<int>" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "XF<int>"
// CHECK: !MDTemplateTypeParameter(name: "T" // CHECK: !DITemplateTypeParameter(name: "T"
template int fx(XF<int>); template int fx(XF<int>);

View File

@ -25,12 +25,12 @@ int global_namespace_variable = 1;
// functions that belong to the namespace have it as a context, and the global // functions that belong to the namespace have it as a context, and the global
// function has the file as a context. // function has the file as a context.
// CHECK: ![[FILE:[0-9]+]] = !MDFile(filename: "{{.*}}context.cpp", // CHECK: ![[FILE:[0-9]+]] = !DIFile(filename: "{{.*}}context.cpp",
// CHECK: !MDSubprogram(name: "member_function",{{.*}} scope: !"_ZTS1C",{{.*}} isDefinition: true // CHECK: !DISubprogram(name: "member_function",{{.*}} scope: !"_ZTS1C",{{.*}} isDefinition: true
// CHECK: !MDSubprogram(name: "static_member_function",{{.*}} scope: !"_ZTS1C",{{.*}} isDefinition: true // CHECK: !DISubprogram(name: "static_member_function",{{.*}} scope: !"_ZTS1C",{{.*}} isDefinition: true
// CHECK: !MDSubprogram(name: "global_function",{{.*}} scope: ![[FILE]],{{.*}} isDefinition: true // CHECK: !DISubprogram(name: "global_function",{{.*}} scope: ![[FILE]],{{.*}} isDefinition: true
// CHECK: !MDSubprogram(name: "global_namespace_function",{{.*}} scope: ![[NS:[0-9]+]],{{.*}} isDefinition: true // CHECK: !DISubprogram(name: "global_namespace_function",{{.*}} scope: ![[NS:[0-9]+]],{{.*}} isDefinition: true
// CHECK: ![[NS]] = !MDNamespace(name: "ns" // CHECK: ![[NS]] = !DINamespace(name: "ns"

View File

@ -19,7 +19,7 @@ int main(int argc, char** argv) {
// Make sure we have two DW_TAG_structure_types for baz and bar and no forward // Make sure we have two DW_TAG_structure_types for baz and bar and no forward
// references. // references.
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "bar" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "bar"
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "baz" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "baz"
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl

View File

@ -16,12 +16,12 @@ void foo() {
static A stat; static A stat;
} }
// CHECK-NOKEXT: !MDSubprogram(name: "__cxx_global_var_init",{{.*}} line: 12,{{.*}} isLocal: true, isDefinition: true // CHECK-NOKEXT: !DISubprogram(name: "__cxx_global_var_init",{{.*}} line: 12,{{.*}} isLocal: true, isDefinition: true
// CHECK-NOKEXT: !MDSubprogram(name: "__dtor_glob",{{.*}} line: 12,{{.*}} isLocal: true, isDefinition: true // CHECK-NOKEXT: !DISubprogram(name: "__dtor_glob",{{.*}} line: 12,{{.*}} isLocal: true, isDefinition: true
// CHECK-NOKEXT: !MDSubprogram(name: "__cxx_global_var_init1",{{.*}} line: 13,{{.*}} isLocal: true, isDefinition: true // CHECK-NOKEXT: !DISubprogram(name: "__cxx_global_var_init1",{{.*}} line: 13,{{.*}} isLocal: true, isDefinition: true
// CHECK-NOKEXT: !MDSubprogram(name: "__cxx_global_array_dtor",{{.*}} line: 13,{{.*}} isLocal: true, isDefinition: true // CHECK-NOKEXT: !DISubprogram(name: "__cxx_global_array_dtor",{{.*}} line: 13,{{.*}} isLocal: true, isDefinition: true
// CHECK-NOKEXT: !MDSubprogram(name: "__dtor_array",{{.*}} line: 13,{{.*}} isLocal: true, isDefinition: true // CHECK-NOKEXT: !DISubprogram(name: "__dtor_array",{{.*}} line: 13,{{.*}} isLocal: true, isDefinition: true
// CHECK-NOKEXT: !MDSubprogram(name: "__dtor__ZZ3foovE4stat",{{.*}} line: 16,{{.*}} isLocal: true, isDefinition: true // CHECK-NOKEXT: !DISubprogram(name: "__dtor__ZZ3foovE4stat",{{.*}} line: 16,{{.*}} isLocal: true, isDefinition: true
// CHECK-NOKEXT: !MDSubprogram({{.*}} isLocal: true, isDefinition: true // CHECK-NOKEXT: !DISubprogram({{.*}} isLocal: true, isDefinition: true
// CHECK-KEXT: !MDSubprogram({{.*}} isLocal: true, isDefinition: true // CHECK-KEXT: !DISubprogram({{.*}} isLocal: true, isDefinition: true

View File

@ -10,12 +10,12 @@ int f1() {
return ns::cnst + ns::cnst; return ns::cnst + ns::cnst;
} }
// CHECK: !MDCompileUnit( // CHECK: !DICompileUnit(
// CHECK-SAME: globals: [[GLOBALS:![0-9]*]] // CHECK-SAME: globals: [[GLOBALS:![0-9]*]]
// CHECK: [[GLOBALS]] = !{[[CNST:![0-9]*]]} // CHECK: [[GLOBALS]] = !{[[CNST:![0-9]*]]}
// CHECK: [[CNST]] = !MDGlobalVariable(name: "cnst", // CHECK: [[CNST]] = !DIGlobalVariable(name: "cnst",
// CHECK-SAME: scope: [[NS:![0-9]*]] // CHECK-SAME: scope: [[NS:![0-9]*]]
// CHECK: [[NS]] = !MDNamespace(name: "ns" // CHECK: [[NS]] = !DINamespace(name: "ns"

View File

@ -34,5 +34,5 @@ int main(void) {}
// CHECK-NOT: __cxx_global_var_init // CHECK-NOT: __cxx_global_var_init
// CHECK: store i32 %[[C2]], i32* @_ZL1k, align 4, !dbg // CHECK: store i32 %[[C2]], i32* @_ZL1k, align 4, !dbg
// //
// CHECK: ![[LINE]] = !MDLocation(line: 13, // CHECK: ![[LINE]] = !DILocation(line: 13,
// CHECK: ![[LINE2]] = !MDLocation(line: 15, // CHECK: ![[LINE2]] = !DILocation(line: 15,

View File

@ -7,13 +7,13 @@ template <class T, int T::*ptr> class Foo { };
struct Bar { struct Bar {
int i1; int i1;
// CHECK: ![[INT:[0-9]+]] = !MDBasicType(name: "int" // CHECK: ![[INT:[0-9]+]] = !DIBasicType(name: "int"
// CHECK: !MDDerivedType(tag: DW_TAG_member, scope: // CHECK: !DIDerivedType(tag: DW_TAG_member, scope:
// CHECK-SAME: line: [[@LINE+3]] // CHECK-SAME: line: [[@LINE+3]]
// CHECK-SAME: baseType: !"_ZTSN3BarUt_E" // CHECK-SAME: baseType: !"_ZTSN3BarUt_E"
// CHECK-SAME: size: 32, align: 32, offset: 32 // CHECK-SAME: size: 32, align: 32, offset: 32
union { union {
// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "i2", // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "i2",
// CHECK-SAME: line: [[@LINE+5]] // CHECK-SAME: line: [[@LINE+5]]
// CHECK-SAME: baseType: ![[INT]] // CHECK-SAME: baseType: ![[INT]]
// CHECK-SAME: size: 32, align: 32 // CHECK-SAME: size: 32, align: 32

View File

@ -1,6 +1,6 @@
// RUN: %clang -flimit-debug-info -emit-llvm -g -S %s -o - | FileCheck %s // RUN: %clang -flimit-debug-info -emit-llvm -g -S %s -o - | FileCheck %s
// CHECK: !MDCompositeType(tag: DW_TAG_class_type, name: "A" // CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A"
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
class A { class A {
@ -13,7 +13,7 @@ A *foo (A* x) {
return a; return a;
} }
// CHECK: !MDCompositeType(tag: DW_TAG_class_type, name: "B" // CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "B"
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
@ -28,7 +28,7 @@ int baz(B *b) {
} }
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "C" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "C"
// CHECK-SAME: flags: DIFlagFwdDecl // CHECK-SAME: flags: DIFlagFwdDecl
struct C { struct C {

View File

@ -48,8 +48,8 @@ int main() {
// CHECK: br label // CHECK: br label
// CHECK: br label {{.*}}, !dbg [[DBG4:!.*]] // CHECK: br label {{.*}}, !dbg [[DBG4:!.*]]
// CHECK: [[DBG1]] = !MDLocation(line: 100, scope: !{{.*}}) // CHECK: [[DBG1]] = !DILocation(line: 100, scope: !{{.*}})
// CHECK: [[DBG2]] = !MDLocation(line: 200, scope: !{{.*}}) // CHECK: [[DBG2]] = !DILocation(line: 200, scope: !{{.*}})
// CHECK: [[DBG3]] = !MDLocation(line: 300, scope: !{{.*}}) // CHECK: [[DBG3]] = !DILocation(line: 300, scope: !{{.*}})
// CHECK: [[DBG4]] = !MDLocation(line: 401, scope: !{{.*}}) // CHECK: [[DBG4]] = !DILocation(line: 401, scope: !{{.*}})
} }

View File

@ -293,32 +293,32 @@ void f24() {
f24_a(); f24_a();
} }
// CHECK: [[DBG_F1]] = !MDLocation(line: 100, // CHECK: [[DBG_F1]] = !DILocation(line: 100,
// CHECK: [[DBG_FOO_VALUE]] = !MDLocation(line: 200, // CHECK: [[DBG_FOO_VALUE]] = !DILocation(line: 200,
// CHECK: [[DBG_FOO_REF]] = !MDLocation(line: 202, // CHECK: [[DBG_FOO_REF]] = !DILocation(line: 202,
// CHECK: [[DBG_FOO_COMPLEX]] = !MDLocation(line: 204, // CHECK: [[DBG_FOO_COMPLEX]] = !DILocation(line: 204,
// CHECK: [[DBG_F2]] = !MDLocation(line: 300, // CHECK: [[DBG_F2]] = !DILocation(line: 300,
// CHECK: [[DBG_F3]] = !MDLocation(line: 400, // CHECK: [[DBG_F3]] = !DILocation(line: 400,
// CHECK: [[DBG_F4]] = !MDLocation(line: 500, // CHECK: [[DBG_F4]] = !DILocation(line: 500,
// CHECK: [[DBG_F5]] = !MDLocation(line: 600, // CHECK: [[DBG_F5]] = !DILocation(line: 600,
// CHECK: [[DBG_F6]] = !MDLocation(line: 700, // CHECK: [[DBG_F6]] = !DILocation(line: 700,
// CHECK: [[DBG_F7]] = !MDLocation(line: 800, // CHECK: [[DBG_F7]] = !DILocation(line: 800,
// CHECK: [[DBG_F8]] = !MDLocation(line: 900, // CHECK: [[DBG_F8]] = !DILocation(line: 900,
// CHECK: [[DBG_F9]] = !MDLocation(line: 1000, // CHECK: [[DBG_F9]] = !DILocation(line: 1000,
// CHECK: [[DBG_F10_STORE]] = !MDLocation(line: 1100, // CHECK: [[DBG_F10_STORE]] = !DILocation(line: 1100,
// CHECK: [[DBG_GLBL_CTOR_B]] = !MDLocation(line: 1200, // CHECK: [[DBG_GLBL_CTOR_B]] = !DILocation(line: 1200,
// CHECK: [[DBG_GLBL_DTOR_B]] = !MDLocation(line: 1200, // CHECK: [[DBG_GLBL_DTOR_B]] = !DILocation(line: 1200,
// CHECK: [[DBG_F11]] = !MDLocation(line: 1300, // CHECK: [[DBG_F11]] = !DILocation(line: 1300,
// CHECK: [[DBG_F12]] = !MDLocation(line: 1400, // CHECK: [[DBG_F12]] = !DILocation(line: 1400,
// CHECK: [[DBG_F13]] = !MDLocation(line: 1500, // CHECK: [[DBG_F13]] = !DILocation(line: 1500,
// CHECK: [[DBG_F14_CTOR_CALL]] = !MDLocation(line: 1600, // CHECK: [[DBG_F14_CTOR_CALL]] = !DILocation(line: 1600,
// CHECK: [[DBG_F15]] = !MDLocation(line: 1700, // CHECK: [[DBG_F15]] = !DILocation(line: 1700,
// CHECK: [[DBG_F16]] = !MDLocation(line: 1800, // CHECK: [[DBG_F16]] = !DILocation(line: 1800,
// CHECK: [[DBG_F17]] = !MDLocation(line: 1900, // CHECK: [[DBG_F17]] = !DILocation(line: 1900,
// CHECK: [[DBG_F18_1]] = !MDLocation(line: 2000, // CHECK: [[DBG_F18_1]] = !DILocation(line: 2000,
// CHECK: [[DBG_F18_2]] = !MDLocation(line: 2001, // CHECK: [[DBG_F18_2]] = !DILocation(line: 2001,
// CHECK: [[DBG_F19_1]] = !MDLocation(line: 2100, // CHECK: [[DBG_F19_1]] = !DILocation(line: 2100,
// CHECK: [[DBG_F19_2]] = !MDLocation(line: 2101, // CHECK: [[DBG_F19_2]] = !DILocation(line: 2101,
// CHECK: [[DBG_F20_1]] = !MDLocation(line: 2200, // CHECK: [[DBG_F20_1]] = !DILocation(line: 2200,
// CHECK: [[DBG_F23]] = !MDLocation(line: 2500, // CHECK: [[DBG_F23]] = !DILocation(line: 2500,
// CHECK: [[DBG_F24]] = !MDLocation(line: 2600, // CHECK: [[DBG_F24]] = !DILocation(line: 2600,

View File

@ -1,16 +1,16 @@
// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -std=c++11 -g %s -o - | FileCheck %s // RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -std=c++11 -g %s -o - | FileCheck %s
// CHECK: !MDCompositeType(tag: DW_TAG_class_type, name: "A",{{.*}} identifier: "_ZTS1A") // CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A",{{.*}} identifier: "_ZTS1A")
// CHECK: !MDSubprogram(name: "foo", linkageName: "_ZN1A3fooEiS_3$_0" // CHECK: !DISubprogram(name: "foo", linkageName: "_ZN1A3fooEiS_3$_0"
// CHECK-SAME: DIFlagProtected // CHECK-SAME: DIFlagProtected
// CHECK: ![[THISTYPE:[0-9]+]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1A" // CHECK: ![[THISTYPE:[0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1A"
// CHECK-SAME: DIFlagArtificial // CHECK-SAME: DIFlagArtificial
// CHECK: !MDDerivedType(tag: DW_TAG_ptr_to_member_type // CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type
// CHECK: !MDDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[MEMFUNTYPE:[0-9]+]] // CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[MEMFUNTYPE:[0-9]+]]
// CHECK: ![[MEMFUNTYPE]] = !MDSubroutineType(types: ![[MEMFUNARGS:[0-9]+]]) // CHECK: ![[MEMFUNTYPE]] = !DISubroutineType(types: ![[MEMFUNARGS:[0-9]+]])
// CHECK: ![[MEMFUNARGS]] = {{.*}}, ![[THISTYPE]], // CHECK: ![[MEMFUNARGS]] = {{.*}}, ![[THISTYPE]],
// CHECK: !MDLocalVariable(tag: DW_TAG_arg_variable // CHECK: !DILocalVariable(tag: DW_TAG_arg_variable
// CHECK: !MDLocalVariable(tag: DW_TAG_arg_variable // CHECK: !DILocalVariable(tag: DW_TAG_arg_variable
// CHECK: !MDLocalVariable(tag: DW_TAG_arg_variable // CHECK: !DILocalVariable(tag: DW_TAG_arg_variable
union { union {
int a; int a;
float b; float b;

View File

@ -55,59 +55,59 @@ void B::func_fwd() {}
// This should work even if 'i' and 'func' were declarations & not definitions, // This should work even if 'i' and 'func' were declarations & not definitions,
// but it doesn't yet. // but it doesn't yet.
// CHECK: [[CU:![0-9]+]] = !MDCompileUnit( // CHECK: [[CU:![0-9]+]] = !DICompileUnit(
// CHECK-SAME: imports: [[MODULES:![0-9]*]] // CHECK-SAME: imports: [[MODULES:![0-9]*]]
// CHECK: [[FOO:![0-9]+]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "foo", // CHECK: [[FOO:![0-9]+]] = !DICompositeType(tag: DW_TAG_structure_type, name: "foo",
// CHECK-SAME: line: 5 // CHECK-SAME: line: 5
// CHECK-SAME: DIFlagFwdDecl // CHECK-SAME: DIFlagFwdDecl
// CHECK: [[FOOCPP:![0-9]+]] = !MDFile(filename: "foo.cpp" // CHECK: [[FOOCPP:![0-9]+]] = !DIFile(filename: "foo.cpp"
// CHECK: [[NS:![0-9]+]] = !MDNamespace(name: "B", scope: [[CTXT:![0-9]+]], file: [[FOOCPP]], line: 1) // CHECK: [[NS:![0-9]+]] = !DINamespace(name: "B", scope: [[CTXT:![0-9]+]], file: [[FOOCPP]], line: 1)
// CHECK: [[CTXT]] = !MDNamespace(name: "A", scope: null, file: [[FILE:![0-9]+]], line: 5) // CHECK: [[CTXT]] = !DINamespace(name: "A", scope: null, file: [[FILE:![0-9]+]], line: 5)
// CHECK: [[FILE]] = !MDFile(filename: "{{.*}}debug-info-namespace.cpp", // CHECK: [[FILE]] = !DIFile(filename: "{{.*}}debug-info-namespace.cpp",
// CHECK: [[BAR:![0-9]+]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "bar", // CHECK: [[BAR:![0-9]+]] = !DICompositeType(tag: DW_TAG_structure_type, name: "bar",
// CHECK-SAME: line: 6 // CHECK-SAME: line: 6
// CHECK-SAME: DIFlagFwdDecl // CHECK-SAME: DIFlagFwdDecl
// CHECK: [[F1:![0-9]+]] = !MDSubprogram(name: "f1",{{.*}} line: 4 // CHECK: [[F1:![0-9]+]] = !DISubprogram(name: "f1",{{.*}} line: 4
// CHECK-SAME: isDefinition: true // CHECK-SAME: isDefinition: true
// CHECK: [[FUNC:![0-9]+]] = !MDSubprogram(name: "func",{{.*}} isDefinition: true // CHECK: [[FUNC:![0-9]+]] = !DISubprogram(name: "func",{{.*}} isDefinition: true
// CHECK: [[FUNC_FWD:![0-9]+]] = !MDSubprogram(name: "func_fwd",{{.*}} line: 47,{{.*}} isDefinition: true // CHECK: [[FUNC_FWD:![0-9]+]] = !DISubprogram(name: "func_fwd",{{.*}} line: 47,{{.*}} isDefinition: true
// CHECK: [[I:![0-9]+]] = !MDGlobalVariable(name: "i",{{.*}} scope: [[NS]], // CHECK: [[I:![0-9]+]] = !DIGlobalVariable(name: "i",{{.*}} scope: [[NS]],
// CHECK: [[VAR_FWD:![0-9]+]] = !MDGlobalVariable(name: "var_fwd",{{.*}} scope: [[NS]], // CHECK: [[VAR_FWD:![0-9]+]] = !DIGlobalVariable(name: "var_fwd",{{.*}} scope: [[NS]],
// CHECK-SAME: line: 44 // CHECK-SAME: line: 44
// CHECK-SAME: isDefinition: true // CHECK-SAME: isDefinition: true
// CHECK: [[MODULES]] = !{[[M1:![0-9]+]], [[M2:![0-9]+]], [[M3:![0-9]+]], [[M4:![0-9]+]], [[M5:![0-9]+]], [[M6:![0-9]+]], [[M7:![0-9]+]], [[M8:![0-9]+]], [[M9:![0-9]+]], [[M10:![0-9]+]], [[M11:![0-9]+]], [[M12:![0-9]+]], [[M13:![0-9]+]], [[M14:![0-9]+]], [[M15:![0-9]+]], [[M16:![0-9]+]], [[M17:![0-9]+]]} // CHECK: [[MODULES]] = !{[[M1:![0-9]+]], [[M2:![0-9]+]], [[M3:![0-9]+]], [[M4:![0-9]+]], [[M5:![0-9]+]], [[M6:![0-9]+]], [[M7:![0-9]+]], [[M8:![0-9]+]], [[M9:![0-9]+]], [[M10:![0-9]+]], [[M11:![0-9]+]], [[M12:![0-9]+]], [[M13:![0-9]+]], [[M14:![0-9]+]], [[M15:![0-9]+]], [[M16:![0-9]+]], [[M17:![0-9]+]]}
// CHECK: [[M1]] = !MDImportedEntity(tag: DW_TAG_imported_module, scope: [[CTXT]], entity: [[NS]], line: 15) // CHECK: [[M1]] = !DIImportedEntity(tag: DW_TAG_imported_module, scope: [[CTXT]], entity: [[NS]], line: 15)
// CHECK: [[M2]] = !MDImportedEntity(tag: DW_TAG_imported_module, scope: [[CU]], entity: [[CTXT]], // CHECK: [[M2]] = !DIImportedEntity(tag: DW_TAG_imported_module, scope: [[CU]], entity: [[CTXT]],
// CHECK: [[M3]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, name: "E", scope: [[CU]], entity: [[CTXT]], line: 19) // CHECK: [[M3]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, name: "E", scope: [[CU]], entity: [[CTXT]], line: 19)
// CHECK: [[M4]] = !MDImportedEntity(tag: DW_TAG_imported_module, scope: [[LEX2:![0-9]+]], entity: [[NS]], line: 23) // CHECK: [[M4]] = !DIImportedEntity(tag: DW_TAG_imported_module, scope: [[LEX2:![0-9]+]], entity: [[NS]], line: 23)
// CHECK: [[LEX2]] = distinct !MDLexicalBlock(scope: [[LEX1:![0-9]+]], file: [[FOOCPP]], // CHECK: [[LEX2]] = distinct !DILexicalBlock(scope: [[LEX1:![0-9]+]], file: [[FOOCPP]],
// CHECK: [[LEX1]] = distinct !MDLexicalBlock(scope: [[FUNC]], file: [[FOOCPP]], // CHECK: [[LEX1]] = distinct !DILexicalBlock(scope: [[FUNC]], file: [[FOOCPP]],
// CHECK: [[M5]] = !MDImportedEntity(tag: DW_TAG_imported_module, scope: [[FUNC]], entity: [[CTXT]], // CHECK: [[M5]] = !DIImportedEntity(tag: DW_TAG_imported_module, scope: [[FUNC]], entity: [[CTXT]],
// CHECK: [[M6]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[FOO:!"_ZTSN1A1B3fooE"]], line: 27) // CHECK: [[M6]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[FOO:!"_ZTSN1A1B3fooE"]], line: 27)
// CHECK: [[M7]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[BAR:!"_ZTSN1A1B3barE"]] // CHECK: [[M7]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[BAR:!"_ZTSN1A1B3barE"]]
// CHECK: [[M8]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[F1]] // CHECK: [[M8]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[F1]]
// CHECK: [[M9]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[I]] // CHECK: [[M9]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[I]]
// CHECK: [[M10]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[BAZ:![0-9]+]] // CHECK: [[M10]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[BAZ:![0-9]+]]
// CHECK: [[BAZ]] = !MDDerivedType(tag: DW_TAG_typedef, name: "baz", scope: [[NS]], file: [[FOOCPP]], // CHECK: [[BAZ]] = !DIDerivedType(tag: DW_TAG_typedef, name: "baz", scope: [[NS]], file: [[FOOCPP]],
// CHECK-SAME: baseType: !"_ZTSN1A1B3barE" // CHECK-SAME: baseType: !"_ZTSN1A1B3barE"
// CHECK: [[M11]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, name: "X", scope: [[FUNC]], entity: [[CTXT]] // CHECK: [[M11]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, name: "X", scope: [[FUNC]], entity: [[CTXT]]
// CHECK: [[M12]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, name: "Y", scope: [[FUNC]], entity: [[M11]] // CHECK: [[M12]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, name: "Y", scope: [[FUNC]], entity: [[M11]]
// CHECK: [[M13]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[VAR_DECL:![0-9]+]] // CHECK: [[M13]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[VAR_DECL:![0-9]+]]
// CHECK: [[VAR_DECL]] = !MDGlobalVariable(name: "var_decl", linkageName: "_ZN1A1B8var_declE", scope: [[NS]],{{.*}} line: 8, // CHECK: [[VAR_DECL]] = !DIGlobalVariable(name: "var_decl", linkageName: "_ZN1A1B8var_declE", scope: [[NS]],{{.*}} line: 8,
// CHECK: [[M14]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[FUNC_DECL:![0-9]+]] // CHECK: [[M14]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[FUNC_DECL:![0-9]+]]
// CHECK: [[FUNC_DECL]] = !MDSubprogram(name: "func_decl", // CHECK: [[FUNC_DECL]] = !DISubprogram(name: "func_decl",
// CHECK-SAME: scope: [[NS]], file: [[FOOCPP]], line: 9 // CHECK-SAME: scope: [[NS]], file: [[FOOCPP]], line: 9
// CHECK: [[M15]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[VAR_FWD:![0-9]+]] // CHECK: [[M15]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[VAR_FWD:![0-9]+]]
// CHECK: [[M16]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[FUNC_FWD:![0-9]+]] // CHECK: [[M16]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[FUNC_FWD:![0-9]+]]
// CHECK: [[M17]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[CTXT]], entity: [[I]] // CHECK: [[M17]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[CTXT]], entity: [[I]]
// CHECK-GMLT: [[CU:![0-9]+]] = !MDCompileUnit( // CHECK-GMLT: [[CU:![0-9]+]] = !DICompileUnit(
// CHECK-GMLT-SAME: emissionKind: 2, // CHECK-GMLT-SAME: emissionKind: 2,
// CHECK-GMLT-SAME: imports: [[MODULES:![0-9]+]] // CHECK-GMLT-SAME: imports: [[MODULES:![0-9]+]]
// CHECK-GMLT: [[MODULES]] = !{} // CHECK-GMLT: [[MODULES]] = !{}
// CHECK-NOLIMIT: !MDCompositeType(tag: DW_TAG_structure_type, name: "bar",{{.*}} line: 6, // CHECK-NOLIMIT: !DICompositeType(tag: DW_TAG_structure_type, name: "bar",{{.*}} line: 6,
// CHECK-NOLIMIT-NOT: DIFlagFwdDecl // CHECK-NOLIMIT-NOT: DIFlagFwdDecl
// CHECK-NOLIMIT-SAME: ){{$}} // CHECK-NOLIMIT-SAME: ){{$}}

View File

@ -4,4 +4,4 @@ void foo() {
decltype(nullptr) t = 0; decltype(nullptr) t = 0;
} }
// CHECK: !MDBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)") // CHECK: !DIBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)")

View File

@ -7,5 +7,5 @@ struct T {
void foo(int (T::*method)()) {} void foo(int (T::*method)()) {}
// A pointer to a member function is a pair of function- and this-pointer. // A pointer to a member function is a pair of function- and this-pointer.
// CHECK: !MDDerivedType(tag: DW_TAG_ptr_to_member_type, // CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type,
// CHECK-SAME: size: 128 // CHECK-SAME: size: 128

View File

@ -2,35 +2,35 @@
// Test (r)value and CVR qualifiers on C++11 non-static member functions. // Test (r)value and CVR qualifiers on C++11 non-static member functions.
class A { class A {
public: public:
// CHECK: !MDSubprogram(name: "l", // CHECK: !DISubprogram(name: "l",
// CHECK-SAME: line: [[@LINE+4]] // CHECK-SAME: line: [[@LINE+4]]
// CHECK-SAME: type: ![[PLSR:[0-9]+]] // CHECK-SAME: type: ![[PLSR:[0-9]+]]
// CHECK-SAME: flags: DIFlagPublic | DIFlagPrototyped | DIFlagLValueReference, // CHECK-SAME: flags: DIFlagPublic | DIFlagPrototyped | DIFlagLValueReference,
// CHECK: ![[PLSR]] = !MDSubroutineType(flags: DIFlagLValueReference, types: ![[ARGS:[0-9]+]]) // CHECK: ![[PLSR]] = !DISubroutineType(flags: DIFlagLValueReference, types: ![[ARGS:[0-9]+]])
void l() const &; void l() const &;
// CHECK: ![[ARGS]] = !{null, ![[THIS:[0-9]+]]} // CHECK: ![[ARGS]] = !{null, ![[THIS:[0-9]+]]}
// CHECK: ![[THIS]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: ![[CONST_A:[0-9]+]] // CHECK: ![[THIS]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[CONST_A:[0-9]+]]
// CHECK: ![[CONST_A]] = !MDDerivedType(tag: DW_TAG_const_type // CHECK: ![[CONST_A]] = !DIDerivedType(tag: DW_TAG_const_type
// CHECK: !MDSubprogram(name: "r" // CHECK: !DISubprogram(name: "r"
// CHECK-SAME: line: [[@LINE+4]] // CHECK-SAME: line: [[@LINE+4]]
// CHECK-SAME: type: ![[PRSR:[0-9]+]] // CHECK-SAME: type: ![[PRSR:[0-9]+]]
// CHECK-SAME: flags: DIFlagPublic | DIFlagPrototyped | DIFlagRValueReference, // CHECK-SAME: flags: DIFlagPublic | DIFlagPrototyped | DIFlagRValueReference,
// CHECK: ![[PRSR]] = !MDSubroutineType(flags: DIFlagRValueReference, types: ![[ARGS]]) // CHECK: ![[PRSR]] = !DISubroutineType(flags: DIFlagRValueReference, types: ![[ARGS]])
void r() const &&; void r() const &&;
}; };
void g() { void g() {
A a; A a;
// The type of pl is "void (A::*)() const &". // The type of pl is "void (A::*)() const &".
// CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable, name: "pl", // CHECK: !DILocalVariable(tag: DW_TAG_auto_variable, name: "pl",
// CHECK-SAME: line: [[@LINE+3]] // CHECK-SAME: line: [[@LINE+3]]
// CHECK-SAME: type: ![[PL:[0-9]+]] // CHECK-SAME: type: ![[PL:[0-9]+]]
// CHECK: !MDDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[PLSR]] // CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[PLSR]]
auto pl = &A::l; auto pl = &A::l;
// CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable, name: "pr", // CHECK: !DILocalVariable(tag: DW_TAG_auto_variable, name: "pr",
// CHECK-SAME: line: [[@LINE+3]] // CHECK-SAME: line: [[@LINE+3]]
// CHECK-SAME: type: ![[PR:[0-9]+]] // CHECK-SAME: type: ![[PR:[0-9]+]]
// CHECK: !MDDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[PRSR]] // CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[PRSR]]
auto pr = &A::r; auto pr = &A::r;
} }

View File

@ -8,5 +8,5 @@ void foo (int &&i)
printf("%d\n", i); printf("%d\n", i);
} }
// CHECK: !MDDerivedType(tag: DW_TAG_rvalue_reference_type, baseType: ![[INT:[0-9]+]]) // CHECK: !DIDerivedType(tag: DW_TAG_rvalue_reference_type, baseType: ![[INT:[0-9]+]])
// CHECK: ![[INT]] = !MDBasicType(name: "int" // CHECK: ![[INT]] = !DIBasicType(name: "int"

View File

@ -9,31 +9,31 @@ int src();
void f(); void f();
void func() { void func() {
// CHECK: = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "i" // CHECK: = !DILocalVariable(tag: DW_TAG_auto_variable, name: "i"
// CHECK-SAME: scope: [[IF1:![0-9]*]] // CHECK-SAME: scope: [[IF1:![0-9]*]]
// CHECK-SAME: line: [[@LINE+2]] // CHECK-SAME: line: [[@LINE+2]]
// CHECK: [[IF1]] = distinct !MDLexicalBlock({{.*}}line: [[@LINE+1]]) // CHECK: [[IF1]] = distinct !DILexicalBlock({{.*}}line: [[@LINE+1]])
if (int i = src()) if (int i = src())
f(); f();
// CHECK: = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "i" // CHECK: = !DILocalVariable(tag: DW_TAG_auto_variable, name: "i"
// CHECK-SAME: scope: [[IF2:![0-9]*]] // CHECK-SAME: scope: [[IF2:![0-9]*]]
// CHECK-SAME: line: [[@LINE+2]] // CHECK-SAME: line: [[@LINE+2]]
// CHECK: [[IF2]] = distinct !MDLexicalBlock({{.*}}line: [[@LINE+1]]) // CHECK: [[IF2]] = distinct !DILexicalBlock({{.*}}line: [[@LINE+1]])
if (int i = src()) { if (int i = src()) {
f(); f();
} else } else
f(); f();
// CHECK: = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "i" // CHECK: = !DILocalVariable(tag: DW_TAG_auto_variable, name: "i"
// CHECK-SAME: scope: [[FOR:![0-9]*]] // CHECK-SAME: scope: [[FOR:![0-9]*]]
// CHECK-SAME: line: [[@LINE+2]] // CHECK-SAME: line: [[@LINE+2]]
// CHECK: [[FOR]] = distinct !MDLexicalBlock({{.*}}line: [[@LINE+1]]) // CHECK: [[FOR]] = distinct !DILexicalBlock({{.*}}line: [[@LINE+1]])
for (int i = 0; for (int i = 0;
// CHECK: = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "b" // CHECK: = !DILocalVariable(tag: DW_TAG_auto_variable, name: "b"
// CHECK-SAME: scope: [[FOR_BODY:![0-9]*]] // CHECK-SAME: scope: [[FOR_BODY:![0-9]*]]
// CHECK-SAME: line: [[@LINE+6]] // CHECK-SAME: line: [[@LINE+6]]
// CHECK: [[FOR_BODY]] = distinct !MDLexicalBlock({{.*}}line: [[@LINE-4]]) // CHECK: [[FOR_BODY]] = distinct !DILexicalBlock({{.*}}line: [[@LINE-4]])
// The scope could be located at 'bool b', but LLVM drops line information for // The scope could be located at 'bool b', but LLVM drops line information for
// scopes anyway, so it's not terribly important. // scopes anyway, so it's not terribly important.
// FIXME: change the debug info schema to not include locations of scopes, // FIXME: change the debug info schema to not include locations of scopes,
@ -41,32 +41,32 @@ void func() {
bool b = i != 10; ++i) bool b = i != 10; ++i)
f(); f();
// CHECK: = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "i" // CHECK: = !DILocalVariable(tag: DW_TAG_auto_variable, name: "i"
// CHECK-SAME: scope: [[FOR:![0-9]*]] // CHECK-SAME: scope: [[FOR:![0-9]*]]
// CHECK-SAME: line: [[@LINE+2]] // CHECK-SAME: line: [[@LINE+2]]
// CHECK: [[FOR]] = distinct !MDLexicalBlock({{.*}}line: [[@LINE+1]]) // CHECK: [[FOR]] = distinct !DILexicalBlock({{.*}}line: [[@LINE+1]])
for (int i = 0; i != 10; ++i) { for (int i = 0; i != 10; ++i) {
// FIXME: Do not include scopes that have only other scopes (and no variables // FIXME: Do not include scopes that have only other scopes (and no variables
// or using declarations) as direct children, they just waste // or using declarations) as direct children, they just waste
// space/relocations/etc. // space/relocations/etc.
// CHECK: [[FOR_LOOP_INCLUDING_COND:!.*]] = distinct !MDLexicalBlock(scope: [[FOR]],{{.*}} line: [[@LINE-4]]) // CHECK: [[FOR_LOOP_INCLUDING_COND:!.*]] = distinct !DILexicalBlock(scope: [[FOR]],{{.*}} line: [[@LINE-4]])
// CHECK: = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "b" // CHECK: = !DILocalVariable(tag: DW_TAG_auto_variable, name: "b"
// CHECK-SAME: scope: [[FOR_COMPOUND:![0-9]*]] // CHECK-SAME: scope: [[FOR_COMPOUND:![0-9]*]]
// CHECK-SAME: line: [[@LINE+2]] // CHECK-SAME: line: [[@LINE+2]]
// CHECK: [[FOR_COMPOUND]] = distinct !MDLexicalBlock(scope: [[FOR_LOOP_INCLUDING_COND]],{{.*}} line: [[@LINE-8]]) // CHECK: [[FOR_COMPOUND]] = distinct !DILexicalBlock(scope: [[FOR_LOOP_INCLUDING_COND]],{{.*}} line: [[@LINE-8]])
bool b = i % 2; bool b = i % 2;
} }
int x[] = {1, 2}; int x[] = {1, 2};
// CHECK: = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "__range" // CHECK: = !DILocalVariable(tag: DW_TAG_auto_variable, name: "__range"
// CHECK-SAME: scope: [[RANGE_FOR:![0-9]*]] // CHECK-SAME: scope: [[RANGE_FOR:![0-9]*]]
// CHECK-NOT: line: // CHECK-NOT: line:
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
// CHECK: [[RANGE_FOR]] = distinct !MDLexicalBlock({{.*}}, line: [[@LINE+1]]) // CHECK: [[RANGE_FOR]] = distinct !DILexicalBlock({{.*}}, line: [[@LINE+1]])
for (int i : x) { for (int i : x) {
// CHECK: = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "i" // CHECK: = !DILocalVariable(tag: DW_TAG_auto_variable, name: "i"
// CHECK-SAME: scope: [[RANGE_FOR_BODY:![0-9]*]] // CHECK-SAME: scope: [[RANGE_FOR_BODY:![0-9]*]]
// CHECK-SAME: line: [[@LINE-3]] // CHECK-SAME: line: [[@LINE-3]]
// CHECK: [[RANGE_FOR_BODY]] = distinct !MDLexicalBlock(scope: [[RANGE_FOR]],{{.*}} line: [[@LINE-4]]) // CHECK: [[RANGE_FOR_BODY]] = distinct !DILexicalBlock(scope: [[RANGE_FOR]],{{.*}} line: [[@LINE-4]])
} }
} }

View File

@ -7,7 +7,7 @@ namespace A {
} }
// Verify that a is present and mangled. // Verify that a is present and mangled.
// CHECK: !MDSubprogram(name: "a", linkageName: "_ZN1AL1aEi", // CHECK: !DISubprogram(name: "a", linkageName: "_ZN1AL1aEi",
// CHECK-SAME: line: 4 // CHECK-SAME: line: 4
// CHECK-SAME: isDefinition: true // CHECK-SAME: isDefinition: true
// CHECK-SAME: function: i32 (i32)* @_ZN1AL1aEi // CHECK-SAME: function: i32 (i32)* @_ZN1AL1aEi

View File

@ -33,57 +33,57 @@ int main()
// why the definition of "a" comes before the declarations while // why the definition of "a" comes before the declarations while
// "b" and "c" come after. // "b" and "c" come after.
// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "X"{{.*}}, identifier: "_ZTS1X") // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "X"{{.*}}, identifier: "_ZTS1X")
// CHECK: !MDCompositeType(tag: DW_TAG_class_type, name: "C"{{.*}}, identifier: "_ZTS1C") // CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "C"{{.*}}, identifier: "_ZTS1C")
// //
// CHECK: ![[DECL_A:[0-9]+]] = !MDDerivedType(tag: DW_TAG_member, name: "a" // CHECK: ![[DECL_A:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "a"
// CHECK-NOT: size: // CHECK-NOT: size:
// CHECK-NOT: align: // CHECK-NOT: align:
// CHECK-NOT: offset: // CHECK-NOT: offset:
// CHECK-SAME: flags: DIFlagStaticMember) // CHECK-SAME: flags: DIFlagStaticMember)
// //
// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "const_a" // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "const_a"
// CHECK-NOT: size: // CHECK-NOT: size:
// CHECK-NOT: align: // CHECK-NOT: align:
// CHECK-NOT: offset: // CHECK-NOT: offset:
// CHECK-SAME: flags: DIFlagStaticMember, // CHECK-SAME: flags: DIFlagStaticMember,
// CHECK-SAME: extraData: i1 true) // CHECK-SAME: extraData: i1 true)
// //
// CHECK: ![[DECL_B:[0-9]+]] = !MDDerivedType(tag: DW_TAG_member, name: "b" // CHECK: ![[DECL_B:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "b"
// CHECK-NOT: size: // CHECK-NOT: size:
// CHECK-NOT: align: // CHECK-NOT: align:
// CHECK-NOT: offset: // CHECK-NOT: offset:
// CHECK-SAME: flags: DIFlagProtected | DIFlagStaticMember) // CHECK-SAME: flags: DIFlagProtected | DIFlagStaticMember)
// //
// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "const_b" // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "const_b"
// CHECK-NOT: size: // CHECK-NOT: size:
// CHECK-NOT: align: // CHECK-NOT: align:
// CHECK-NOT: offset: // CHECK-NOT: offset:
// CHECK-SAME: flags: DIFlagProtected | DIFlagStaticMember, // CHECK-SAME: flags: DIFlagProtected | DIFlagStaticMember,
// CHECK-SAME: extraData: float 0x{{.*}}) // CHECK-SAME: extraData: float 0x{{.*}})
// //
// CHECK: ![[DECL_C:[0-9]+]] = !MDDerivedType(tag: DW_TAG_member, name: "c" // CHECK: ![[DECL_C:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "c"
// CHECK-NOT: size: // CHECK-NOT: size:
// CHECK-NOT: align: // CHECK-NOT: align:
// CHECK-NOT: offset: // CHECK-NOT: offset:
// CHECK-SAME: flags: DIFlagPublic | DIFlagStaticMember) // CHECK-SAME: flags: DIFlagPublic | DIFlagStaticMember)
// //
// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "const_c" // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "const_c"
// CHECK-NOT: size: // CHECK-NOT: size:
// CHECK-NOT: align: // CHECK-NOT: align:
// CHECK-NOT: offset: // CHECK-NOT: offset:
// CHECK-SAME: flags: DIFlagPublic | DIFlagStaticMember, // CHECK-SAME: flags: DIFlagPublic | DIFlagStaticMember,
// CHECK-SAME: extraData: i32 18) // CHECK-SAME: extraData: i32 18)
// //
// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "x_a" // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "x_a"
// CHECK-SAME: flags: DIFlagPublic | DIFlagStaticMember) // CHECK-SAME: flags: DIFlagPublic | DIFlagStaticMember)
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "static_decl_templ<int>" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "static_decl_templ<int>"
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "static_decl_templ_var" // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "static_decl_templ_var"
// CHECK: [[NS_X:![0-9]+]] = !MDNamespace(name: "x" // CHECK: [[NS_X:![0-9]+]] = !DINamespace(name: "x"
// Test this in an anonymous namespace to ensure the type is retained even when // Test this in an anonymous namespace to ensure the type is retained even when
// it doesn't get automatically retained by the string type reference machinery. // it doesn't get automatically retained by the string type reference machinery.
@ -94,8 +94,8 @@ struct anon_static_decl_struct {
} }
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "anon_static_decl_struct" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "anon_static_decl_struct"
// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "anon_static_decl_var" // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "anon_static_decl_var"
int ref() { int ref() {
return anon_static_decl_struct::anon_static_decl_var; return anon_static_decl_struct::anon_static_decl_var;
@ -113,11 +113,11 @@ int static_decl_templ_ref() {
return static_decl_templ<int>::static_decl_templ_var; return static_decl_templ<int>::static_decl_templ_var;
} }
// CHECK: !MDGlobalVariable(name: "a", {{.*}}variable: i32* @_ZN1C1aE, declaration: ![[DECL_A]]) // CHECK: !DIGlobalVariable(name: "a", {{.*}}variable: i32* @_ZN1C1aE, declaration: ![[DECL_A]])
// CHECK: !MDGlobalVariable(name: "b", {{.*}}variable: i32* @_ZN1C1bE, declaration: ![[DECL_B]]) // CHECK: !DIGlobalVariable(name: "b", {{.*}}variable: i32* @_ZN1C1bE, declaration: ![[DECL_B]])
// CHECK: !MDGlobalVariable(name: "c", {{.*}}variable: i32* @_ZN1C1cE, declaration: ![[DECL_C]]) // CHECK: !DIGlobalVariable(name: "c", {{.*}}variable: i32* @_ZN1C1cE, declaration: ![[DECL_C]])
// CHECK-NOT: !MDGlobalVariable(name: "anon_static_decl_var" // CHECK-NOT: !DIGlobalVariable(name: "anon_static_decl_var"
// Verify that even when a static member declaration is created lazily when // Verify that even when a static member declaration is created lazily when
// creating the definition, the declaration line is that of the canonical // creating the definition, the declaration line is that of the canonical
@ -128,7 +128,7 @@ struct V {
virtual ~V(); // cause the definition of 'V' to be omitted by no-standalone-debug optimization virtual ~V(); // cause the definition of 'V' to be omitted by no-standalone-debug optimization
static const int const_va = 42; static const int const_va = 42;
}; };
// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "const_va", // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "const_va",
// CHECK-SAME: line: [[@LINE-3]] // CHECK-SAME: line: [[@LINE-3]]
// CHECK-SAME: extraData: i32 42 // CHECK-SAME: extraData: i32 42
const int V::const_va; const int V::const_va;
@ -140,5 +140,5 @@ struct y {
int y::z; int y::z;
} }
// CHECK: !MDGlobalVariable(name: "z", // CHECK: !DIGlobalVariable(name: "z",
// CHECK-SAME: scope: [[NS_X]] // CHECK-SAME: scope: [[NS_X]]

View File

@ -4,20 +4,20 @@
// type info at all. // type info at all.
// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -g %s -o - -gline-tables-only | FileCheck %s -check-prefix LINES-ONLY // RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -g %s -o - -gline-tables-only | FileCheck %s -check-prefix LINES-ONLY
// LINES-ONLY-NOT: !MDCompositeType(tag: DW_TAG_structure_type // LINES-ONLY-NOT: !DICompositeType(tag: DW_TAG_structure_type
template <typename T> template <typename T>
struct a { struct a {
}; };
extern template class a<int>; extern template class a<int>;
// CHECK-NOT: MDCompositeType(tag: DW_TAG_structure_type, name: "a<int>" // CHECK-NOT: DICompositeType(tag: DW_TAG_structure_type, name: "a<int>"
template <typename T> template <typename T>
struct b { struct b {
}; };
extern template class b<int>; extern template class b<int>;
b<int> bi; b<int> bi;
// CHECK: MDCompositeType(tag: DW_TAG_structure_type, name: "b<int>" // CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "b<int>"
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
@ -27,7 +27,7 @@ struct c {
}; };
extern template class c<int>; extern template class c<int>;
c<int> ci; c<int> ci;
// CHECK: MDCompositeType(tag: DW_TAG_structure_type, name: "c<int>" // CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "c<int>"
// CHECK-SAME: DIFlagFwdDecl // CHECK-SAME: DIFlagFwdDecl
template <typename T> template <typename T>
@ -36,7 +36,7 @@ struct d {
}; };
extern template class d<int>; extern template class d<int>;
d<int> di; d<int> di;
// CHECK: MDCompositeType(tag: DW_TAG_structure_type, name: "d<int>" // CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "d<int>"
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
@ -52,7 +52,7 @@ e<int> ei;
// There's no guarantee that the out of line definition will appear before the // There's no guarantee that the out of line definition will appear before the
// explicit template instantiation definition, so conservatively emit the type // explicit template instantiation definition, so conservatively emit the type
// definition here. // definition here.
// CHECK: MDCompositeType(tag: DW_TAG_structure_type, name: "e<int>" // CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "e<int>"
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
@ -65,7 +65,7 @@ template <typename T>
void f<T>::g() { void f<T>::g() {
} }
f<int> fi; f<int> fi;
// CHECK: MDCompositeType(tag: DW_TAG_structure_type, name: "f<int>" // CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "f<int>"
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
@ -77,7 +77,7 @@ template <>
void g<int>::f(); void g<int>::f();
extern template class g<int>; extern template class g<int>;
g<int> gi; g<int> gi;
// CHECK: MDCompositeType(tag: DW_TAG_structure_type, name: "g<int>" // CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "g<int>"
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
@ -85,7 +85,7 @@ template <typename T>
struct h { struct h {
}; };
template class h<int>; template class h<int>;
// CHECK: MDCompositeType(tag: DW_TAG_structure_type, name: "h<int>" // CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "h<int>"
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
@ -96,7 +96,7 @@ struct i {
template<> void i<int>::f(); template<> void i<int>::f();
extern template class i<int>; extern template class i<int>;
i<int> ii; i<int> ii;
// CHECK: MDCompositeType(tag: DW_TAG_structure_type, name: "i<int>" // CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "i<int>"
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
@ -105,7 +105,7 @@ struct j {
}; };
extern template class j<int>; extern template class j<int>;
j<int> jj; j<int> jj;
// CHECK: MDCompositeType(tag: DW_TAG_structure_type, name: "j<int, int>" // CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "j<int, int>"
template <typename T> template <typename T>
struct k { struct k {
@ -113,4 +113,4 @@ struct k {
template <> template <>
struct k<int>; struct k<int>;
template struct k<int>; template struct k<int>;
// CHECK-NOT: !MDCompositeType(tag: DW_TAG_structure_type, name: "k<int>" // CHECK-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "k<int>"

View File

@ -2,7 +2,7 @@
// This test is for a crash when emitting debug info for not-yet-completed // This test is for a crash when emitting debug info for not-yet-completed
// types. // types.
// Test that we don't actually emit a forward decl for the offending class: // Test that we don't actually emit a forward decl for the offending class:
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "Derived<int>" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "Derived<int>"
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
// rdar://problem/15931354 // rdar://problem/15931354

View File

@ -1,8 +1,8 @@
// RUN: %clang_cc1 -emit-llvm -fno-standalone-debug -triple %itanium_abi_triple -g %s -o - | FileCheck %s // RUN: %clang_cc1 -emit-llvm -fno-standalone-debug -triple %itanium_abi_triple -g %s -o - | FileCheck %s
// Check that this pointer type is TC<int> // Check that this pointer type is TC<int>
// CHECK: ![[LINE:[0-9]+]] = !MDCompositeType(tag: DW_TAG_class_type, name: "TC<int>"{{.*}}, identifier: "_ZTS2TCIiE") // CHECK: ![[LINE:[0-9]+]] = !DICompositeType(tag: DW_TAG_class_type, name: "TC<int>"{{.*}}, identifier: "_ZTS2TCIiE")
// CHECK: !MDDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS2TCIiE" // CHECK: !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS2TCIiE"
template<typename T> template<typename T>
class TC { class TC {

View File

@ -16,38 +16,38 @@ inline int add3(int x) {
return MyClass().add<3>(x); // even though add<3> is ODR used, don't emit it since we don't codegen it return MyClass().add<3>(x); // even though add<3> is ODR used, don't emit it since we don't codegen it
} }
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
// CHECK-SAME: elements: [[FOO_MEM:![0-9]*]] // CHECK-SAME: elements: [[FOO_MEM:![0-9]*]]
// CHECK-SAME: identifier: "_ZTS3foo" // CHECK-SAME: identifier: "_ZTS3foo"
// CHECK: [[FOO_MEM]] = !{[[FOO_FUNC:![0-9]*]]} // CHECK: [[FOO_MEM]] = !{[[FOO_FUNC:![0-9]*]]}
// CHECK: [[FOO_FUNC]] = !MDSubprogram(name: "func", linkageName: "_ZN3foo4funcEN5outerIS_E5innerE", // CHECK: [[FOO_FUNC]] = !DISubprogram(name: "func", linkageName: "_ZN3foo4funcEN5outerIS_E5innerE",
// CHECK-SAME: type: [[FOO_FUNC_TYPE:![0-9]*]] // CHECK-SAME: type: [[FOO_FUNC_TYPE:![0-9]*]]
// CHECK: [[FOO_FUNC_TYPE]] = !MDSubroutineType(types: [[FOO_FUNC_PARAMS:![0-9]*]]) // CHECK: [[FOO_FUNC_TYPE]] = !DISubroutineType(types: [[FOO_FUNC_PARAMS:![0-9]*]])
// CHECK: [[FOO_FUNC_PARAMS]] = !{null, !{{[0-9]*}}, !"[[OUTER_FOO_INNER_ID:.*]]"} // CHECK: [[FOO_FUNC_PARAMS]] = !{null, !{{[0-9]*}}, !"[[OUTER_FOO_INNER_ID:.*]]"}
// CHECK: !{{[0-9]*}} = !MDCompositeType(tag: DW_TAG_structure_type, name: "inner"{{.*}}, identifier: "[[OUTER_FOO_INNER_ID]]") // CHECK: !{{[0-9]*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "inner"{{.*}}, identifier: "[[OUTER_FOO_INNER_ID]]")
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "virt<elem>" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "virt<elem>"
// CHECK-SAME: elements: [[VIRT_MEM:![0-9]*]] // CHECK-SAME: elements: [[VIRT_MEM:![0-9]*]]
// CHECK-SAME: vtableHolder: !"_ZTS4virtI4elemE" // CHECK-SAME: vtableHolder: !"_ZTS4virtI4elemE"
// CHECK-SAME: templateParams: [[VIRT_TEMP_PARAM:![0-9]*]] // CHECK-SAME: templateParams: [[VIRT_TEMP_PARAM:![0-9]*]]
// CHECK-SAME: identifier: "_ZTS4virtI4elemE" // CHECK-SAME: identifier: "_ZTS4virtI4elemE"
// CHECK: [[VIRT_TEMP_PARAM]] = !{[[VIRT_T:![0-9]*]]} // CHECK: [[VIRT_TEMP_PARAM]] = !{[[VIRT_T:![0-9]*]]}
// CHECK: [[VIRT_T]] = !MDTemplateTypeParameter(name: "T", type: !"_ZTS4elem") // CHECK: [[VIRT_T]] = !DITemplateTypeParameter(name: "T", type: !"_ZTS4elem")
// CHECK: [[C:![0-9]*]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "MyClass" // CHECK: [[C:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "MyClass"
// CHECK-SAME: elements: [[C_MEM:![0-9]*]] // CHECK-SAME: elements: [[C_MEM:![0-9]*]]
// CHECK-SAME: vtableHolder: !"_ZTS7MyClass" // CHECK-SAME: vtableHolder: !"_ZTS7MyClass"
// CHECK-SAME: identifier: "_ZTS7MyClass") // CHECK-SAME: identifier: "_ZTS7MyClass")
// CHECK: [[C_MEM]] = !{[[C_VPTR:![0-9]*]], [[C_FUNC:![0-9]*]]} // CHECK: [[C_MEM]] = !{[[C_VPTR:![0-9]*]], [[C_FUNC:![0-9]*]]}
// CHECK: [[C_VPTR]] = !MDDerivedType(tag: DW_TAG_member, name: "_vptr$MyClass" // CHECK: [[C_VPTR]] = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$MyClass"
// CHECK: [[C_FUNC]] = !MDSubprogram(name: "func",{{.*}} line: 7, // CHECK: [[C_FUNC]] = !DISubprogram(name: "func",{{.*}} line: 7,
// CHECK: [[ELEM:![0-9]*]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "elem" // CHECK: [[ELEM:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "elem"
// CHECK-SAME: elements: [[ELEM_MEM:![0-9]*]] // CHECK-SAME: elements: [[ELEM_MEM:![0-9]*]]
// CHECK-SAME: identifier: "_ZTS4elem" // CHECK-SAME: identifier: "_ZTS4elem"
// CHECK: [[ELEM_MEM]] = !{[[ELEM_X:![0-9]*]]} // CHECK: [[ELEM_MEM]] = !{[[ELEM_X:![0-9]*]]}
// CHECK: [[ELEM_X]] = !MDDerivedType(tag: DW_TAG_member, name: "x", scope: !"_ZTS4elem" // CHECK: [[ELEM_X]] = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !"_ZTS4elem"
// CHECK-SAME: baseType: !"_ZTS4virtI4elemE" // CHECK-SAME: baseType: !"_ZTS4virtI4elemE"
// Check that the member function template specialization and implicit special // Check that the member function template specialization and implicit special
@ -55,9 +55,9 @@ inline int add3(int x) {
// didn't appear in the class's member list (C_MEM). This prevents the functions // didn't appear in the class's member list (C_MEM). This prevents the functions
// from being added to type units, while still appearing in the type // from being added to type units, while still appearing in the type
// declaration/reference in the compile unit. // declaration/reference in the compile unit.
// CHECK: !MDSubprogram(name: "MyClass" // CHECK: !DISubprogram(name: "MyClass"
// CHECK-SAME: scope: !"_ZTS7MyClass" // CHECK-SAME: scope: !"_ZTS7MyClass"
// CHECK: !MDSubprogram(name: "add<2>" // CHECK: !DISubprogram(name: "add<2>"
// CHECK-SAME: scope: !"_ZTS7MyClass" // CHECK-SAME: scope: !"_ZTS7MyClass"
template<typename T> template<typename T>
@ -80,7 +80,7 @@ inline void func() {
outer<foo>::inner x; outer<foo>::inner x;
// CHECK: !MDGlobalVariable(name: "x", // CHECK: !DIGlobalVariable(name: "x",
// CHECK-SAME: type: !"[[OUTER_FOO_INNER_ID]]" // CHECK-SAME: type: !"[[OUTER_FOO_INNER_ID]]"
// CHECK-SAME: variable: %"struct.outer<foo>::inner"* @x // CHECK-SAME: variable: %"struct.outer<foo>::inner"* @x

View File

@ -3,7 +3,7 @@ namespace __pointer_type_imp
{ {
template <class _Tp, class _Dp, bool > struct __pointer_type1 {}; template <class _Tp, class _Dp, bool > struct __pointer_type1 {};
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "__pointer_type1<C, default_delete<C>, false>", // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "__pointer_type1<C, default_delete<C>, false>",
// CHECK-SAME: templateParams: ![[PARAMS:[0-9]+]] // CHECK-SAME: templateParams: ![[PARAMS:[0-9]+]]
// CHECK-SAME: identifier: "_ZTSN18__pointer_type_imp15__pointer_type1I1C14default_deleteIS1_ELb0EEE" // CHECK-SAME: identifier: "_ZTSN18__pointer_type_imp15__pointer_type1I1C14default_deleteIS1_ELb0EEE"
template <class _Tp, class _Dp> struct __pointer_type1<_Tp, _Dp, false> template <class _Tp, class _Dp> struct __pointer_type1<_Tp, _Dp, false>
@ -17,7 +17,7 @@ struct __pointer_type2
// Test that the bool template type parameter is emitted. // Test that the bool template type parameter is emitted.
// //
// CHECK: ![[PARAMS]] = !{!{{.*}}, !{{.*}}, ![[FALSE:[0-9]+]]} // CHECK: ![[PARAMS]] = !{!{{.*}}, !{{.*}}, ![[FALSE:[0-9]+]]}
// CHECK: ![[FALSE]] = !MDTemplateValueParameter(type: !{{[0-9]+}}, value: i8 0) // CHECK: ![[FALSE]] = !DITemplateValueParameter(type: !{{[0-9]+}}, value: i8 0)
typedef typename __pointer_type_imp::__pointer_type1<_Tp, _Dp, false>::type type; typedef typename __pointer_type_imp::__pointer_type1<_Tp, _Dp, false>::type type;
}; };
template <class _Tp> struct default_delete {}; template <class _Tp> struct default_delete {};

View File

@ -15,17 +15,17 @@ void foo (const char *c) {
str.assign(c, str); str.assign(c, str);
} }
// CHECK: [[BS:.*]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "basic_string<char>" // CHECK: [[BS:.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "basic_string<char>"
// CHECK-SAME: line: 4 // CHECK-SAME: line: 4
// CHECK-SAME: size: 8, align: 8 // CHECK-SAME: size: 8, align: 8
// CHECK: [[TYPE:![0-9]*]] = !MDSubroutineType(types: [[ARGS:.*]]) // CHECK: [[TYPE:![0-9]*]] = !DISubroutineType(types: [[ARGS:.*]])
// CHECK: [[ARGS]] = !{!{{.*}}, !{{.*}}, [[P:![0-9]*]], [[R:.*]]} // CHECK: [[ARGS]] = !{!{{.*}}, !{{.*}}, [[P:![0-9]*]], [[R:.*]]}
// CHECK: [[P]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: [[CON:![0-9]*]] // CHECK: [[P]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[CON:![0-9]*]]
// CHECK: [[CON]] = !MDDerivedType(tag: DW_TAG_const_type, baseType: [[CH:![0-9]*]] // CHECK: [[CON]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: [[CH:![0-9]*]]
// CHECK: [[CH]] = !MDBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) // CHECK: [[CH]] = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
// CHECK: [[R]] = !MDDerivedType(tag: DW_TAG_reference_type, baseType: [[CON2:![0-9]*]] // CHECK: [[R]] = !DIDerivedType(tag: DW_TAG_reference_type, baseType: [[CON2:![0-9]*]]
// CHECK: [[CON2]] = !MDDerivedType(tag: DW_TAG_const_type, baseType: !"_ZTS12basic_stringIcE" // CHECK: [[CON2]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: !"_ZTS12basic_stringIcE"
// CHECK: !MDSubprogram(name: "assign" // CHECK: !DISubprogram(name: "assign"
// CHECK-SAME: line: 7 // CHECK-SAME: line: 7
// CHECK-SAME: scopeLine: 8 // CHECK-SAME: scopeLine: 8

View File

@ -1,110 +1,110 @@
// RUN: %clang -S -emit-llvm -target x86_64-unknown_unknown -g %s -o - -std=c++11 | FileCheck %s // RUN: %clang -S -emit-llvm -target x86_64-unknown_unknown -g %s -o - -std=c++11 | FileCheck %s
// CHECK: !MDCompileUnit( // CHECK: !DICompileUnit(
// CHECK-SAME: retainedTypes: [[RETAIN:![0-9]*]] // CHECK-SAME: retainedTypes: [[RETAIN:![0-9]*]]
// CHECK: [[EMPTY:![0-9]*]] = !{} // CHECK: [[EMPTY:![0-9]*]] = !{}
// CHECK: [[RETAIN]] = !{!{{[0-9]]*}}, [[FOO:![0-9]*]], // CHECK: [[RETAIN]] = !{!{{[0-9]]*}}, [[FOO:![0-9]*]],
// CHECK: [[TC:![0-9]*]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "TC<unsigned int, 2, &glb, &foo::e, &foo::f, &foo::g, 1, 2, 3>" // CHECK: [[TC:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "TC<unsigned int, 2, &glb, &foo::e, &foo::f, &foo::g, 1, 2, 3>"
// CHECK-SAME: templateParams: [[TCARGS:![0-9]*]] // CHECK-SAME: templateParams: [[TCARGS:![0-9]*]]
// CHECK: [[TCARGS]] = !{[[TCARG1:![0-9]*]], [[TCARG2:![0-9]*]], [[TCARG3:![0-9]*]], [[TCARG4:![0-9]*]], [[TCARG5:![0-9]*]], [[TCARG6:![0-9]*]], [[TCARG7:![0-9]*]]} // CHECK: [[TCARGS]] = !{[[TCARG1:![0-9]*]], [[TCARG2:![0-9]*]], [[TCARG3:![0-9]*]], [[TCARG4:![0-9]*]], [[TCARG5:![0-9]*]], [[TCARG6:![0-9]*]], [[TCARG7:![0-9]*]]}
// //
// CHECK: [[TCARG1]] = !MDTemplateTypeParameter(name: "T", type: [[UINT:![0-9]*]]) // CHECK: [[TCARG1]] = !DITemplateTypeParameter(name: "T", type: [[UINT:![0-9]*]])
// CHECK: [[UINT:![0-9]*]] = !MDBasicType(name: "unsigned int" // CHECK: [[UINT:![0-9]*]] = !DIBasicType(name: "unsigned int"
// CHECK: [[TCARG2]] = !MDTemplateValueParameter(type: [[UINT]], value: i32 2) // CHECK: [[TCARG2]] = !DITemplateValueParameter(type: [[UINT]], value: i32 2)
// CHECK: [[TCARG3]] = !MDTemplateValueParameter(name: "x", type: [[CINTPTR:![0-9]*]], value: i32* @glb) // CHECK: [[TCARG3]] = !DITemplateValueParameter(name: "x", type: [[CINTPTR:![0-9]*]], value: i32* @glb)
// CHECK: [[CINTPTR]] = !MDDerivedType(tag: DW_TAG_pointer_type, {{.*}}baseType: [[CINT:![0-9]+]] // CHECK: [[CINTPTR]] = !DIDerivedType(tag: DW_TAG_pointer_type, {{.*}}baseType: [[CINT:![0-9]+]]
// CHECK: [[CINT]] = !MDDerivedType(tag: DW_TAG_const_type, {{.*}}baseType: [[INT:![0-9]+]] // CHECK: [[CINT]] = !DIDerivedType(tag: DW_TAG_const_type, {{.*}}baseType: [[INT:![0-9]+]]
// CHECK: [[INT]] = !MDBasicType(name: "int" // CHECK: [[INT]] = !DIBasicType(name: "int"
// CHECK: [[TCARG4]] = !MDTemplateValueParameter(name: "a", type: [[MEMINTPTR:![0-9]*]], value: i64 8) // CHECK: [[TCARG4]] = !DITemplateValueParameter(name: "a", type: [[MEMINTPTR:![0-9]*]], value: i64 8)
// CHECK: [[MEMINTPTR]] = !MDDerivedType(tag: DW_TAG_ptr_to_member_type, {{.*}}baseType: [[INT]], {{.*}}extraData: !"_ZTS3foo") // CHECK: [[MEMINTPTR]] = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, {{.*}}baseType: [[INT]], {{.*}}extraData: !"_ZTS3foo")
// //
// Currently Clang emits the pointer-to-member-function value, but LLVM doesn't // Currently Clang emits the pointer-to-member-function value, but LLVM doesn't
// use it (GCC doesn't emit a value for pointers to member functions either - so // use it (GCC doesn't emit a value for pointers to member functions either - so
// it's not clear what, if any, format would be acceptable to GDB) // it's not clear what, if any, format would be acceptable to GDB)
// //
// CHECK: [[TCARG5]] = !MDTemplateValueParameter(name: "b", type: [[MEMFUNPTR:![0-9]*]], value: { i64, i64 } { i64 ptrtoint (void (%struct.foo*)* @_ZN3foo1fEv to i64), i64 0 }) // CHECK: [[TCARG5]] = !DITemplateValueParameter(name: "b", type: [[MEMFUNPTR:![0-9]*]], value: { i64, i64 } { i64 ptrtoint (void (%struct.foo*)* @_ZN3foo1fEv to i64), i64 0 })
// CHECK: [[MEMFUNPTR]] = !MDDerivedType(tag: DW_TAG_ptr_to_member_type, {{.*}}baseType: [[FTYPE:![0-9]*]], {{.*}}extraData: !"_ZTS3foo") // CHECK: [[MEMFUNPTR]] = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, {{.*}}baseType: [[FTYPE:![0-9]*]], {{.*}}extraData: !"_ZTS3foo")
// CHECK: [[FTYPE]] = !MDSubroutineType(types: [[FARGS:![0-9]*]]) // CHECK: [[FTYPE]] = !DISubroutineType(types: [[FARGS:![0-9]*]])
// CHECK: [[FARGS]] = !{null, [[FARG1:![0-9]*]]} // CHECK: [[FARGS]] = !{null, [[FARG1:![0-9]*]]}
// CHECK: [[FARG1]] = !MDDerivedType(tag: DW_TAG_pointer_type, // CHECK: [[FARG1]] = !DIDerivedType(tag: DW_TAG_pointer_type,
// CHECK-SAME: baseType: !"_ZTS3foo" // CHECK-SAME: baseType: !"_ZTS3foo"
// CHECK-NOT: line: // CHECK-NOT: line:
// CHECK-SAME: size: 64, align: 64 // CHECK-SAME: size: 64, align: 64
// CHECK-NOT: offset: 0 // CHECK-NOT: offset: 0
// CHECK-SAME: DIFlagArtificial // CHECK-SAME: DIFlagArtificial
// //
// CHECK: [[TCARG6]] = !MDTemplateValueParameter(name: "f", type: [[FUNPTR:![0-9]*]], value: void ()* @_ZN3foo1gEv) // CHECK: [[TCARG6]] = !DITemplateValueParameter(name: "f", type: [[FUNPTR:![0-9]*]], value: void ()* @_ZN3foo1gEv)
// CHECK: [[FUNPTR]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: [[FUNTYPE:![0-9]*]] // CHECK: [[FUNPTR]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[FUNTYPE:![0-9]*]]
// CHECK: [[FUNTYPE]] = !MDSubroutineType(types: [[FUNARGS:![0-9]*]]) // CHECK: [[FUNTYPE]] = !DISubroutineType(types: [[FUNARGS:![0-9]*]])
// CHECK: [[FUNARGS]] = !{null} // CHECK: [[FUNARGS]] = !{null}
// CHECK: [[TCARG7]] = !MDTemplateValueParameter(tag: DW_TAG_GNU_template_parameter_pack, name: "Is", value: [[TCARG7_VALS:![0-9]*]]) // CHECK: [[TCARG7]] = !DITemplateValueParameter(tag: DW_TAG_GNU_template_parameter_pack, name: "Is", value: [[TCARG7_VALS:![0-9]*]])
// CHECK: [[TCARG7_VALS]] = !{[[TCARG7_1:![0-9]*]], [[TCARG7_2:![0-9]*]], [[TCARG7_3:![0-9]*]]} // CHECK: [[TCARG7_VALS]] = !{[[TCARG7_1:![0-9]*]], [[TCARG7_2:![0-9]*]], [[TCARG7_3:![0-9]*]]}
// CHECK: [[TCARG7_1]] = !MDTemplateValueParameter(type: [[INT]], value: i32 1) // CHECK: [[TCARG7_1]] = !DITemplateValueParameter(type: [[INT]], value: i32 1)
// CHECK: [[TCARG7_2]] = !MDTemplateValueParameter(type: [[INT]], value: i32 2) // CHECK: [[TCARG7_2]] = !DITemplateValueParameter(type: [[INT]], value: i32 2)
// CHECK: [[TCARG7_3]] = !MDTemplateValueParameter(type: [[INT]], value: i32 3) // CHECK: [[TCARG7_3]] = !DITemplateValueParameter(type: [[INT]], value: i32 3)
// //
// We could just emit a declaration of 'foo' here, rather than the entire // We could just emit a declaration of 'foo' here, rather than the entire
// definition (same goes for any time we emit a member (function or data) // definition (same goes for any time we emit a member (function or data)
// pointer type) // pointer type)
// CHECK: [[FOO]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "foo", {{.*}}identifier: "_ZTS3foo") // CHECK: [[FOO]] = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", {{.*}}identifier: "_ZTS3foo")
// CHECK: !MDSubprogram(name: "f", linkageName: "_ZN3foo1fEv", {{.*}}type: [[FTYPE:![0-9]*]] // CHECK: !DISubprogram(name: "f", linkageName: "_ZN3foo1fEv", {{.*}}type: [[FTYPE:![0-9]*]]
// //
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "nested", // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "nested",
// CHECK-SAME: scope: !"_ZTS2TCIjLj2EXadL_Z3glbEEXadL_ZN3foo1eEEEXadL_ZNS0_1fEvEEXadL_ZNS0_1gEvEEJLi1ELi2ELi3EEE" // CHECK-SAME: scope: !"_ZTS2TCIjLj2EXadL_Z3glbEEXadL_ZN3foo1eEEEXadL_ZNS0_1fEvEEXadL_ZNS0_1gEvEEJLi1ELi2ELi3EEE"
// CHECK-SAME: identifier: "[[TCNESTED:.*]]") // CHECK-SAME: identifier: "[[TCNESTED:.*]]")
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "TC<int, -3, nullptr, nullptr, nullptr, nullptr>" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "TC<int, -3, nullptr, nullptr, nullptr, nullptr>"
// CHECK-SAME: templateParams: [[TCNARGS:![0-9]*]] // CHECK-SAME: templateParams: [[TCNARGS:![0-9]*]]
// CHECK-SAME: identifier: "[[TCNT:.*]]") // CHECK-SAME: identifier: "[[TCNT:.*]]")
// CHECK: [[TCNARGS]] = !{[[TCNARG1:![0-9]*]], [[TCNARG2:![0-9]*]], [[TCNARG3:![0-9]*]], [[TCNARG4:![0-9]*]], [[TCNARG5:![0-9]*]], [[TCNARG6:![0-9]*]], [[TCNARG7:![0-9]*]]} // CHECK: [[TCNARGS]] = !{[[TCNARG1:![0-9]*]], [[TCNARG2:![0-9]*]], [[TCNARG3:![0-9]*]], [[TCNARG4:![0-9]*]], [[TCNARG5:![0-9]*]], [[TCNARG6:![0-9]*]], [[TCNARG7:![0-9]*]]}
// CHECK: [[TCNARG1]] = !MDTemplateTypeParameter(name: "T", type: [[INT]]) // CHECK: [[TCNARG1]] = !DITemplateTypeParameter(name: "T", type: [[INT]])
// CHECK: [[TCNARG2]] = !MDTemplateValueParameter(type: [[INT]], value: i32 -3) // CHECK: [[TCNARG2]] = !DITemplateValueParameter(type: [[INT]], value: i32 -3)
// CHECK: [[TCNARG3]] = !MDTemplateValueParameter(name: "x", type: [[CINTPTR]], value: i8 0) // CHECK: [[TCNARG3]] = !DITemplateValueParameter(name: "x", type: [[CINTPTR]], value: i8 0)
// The interesting null pointer: -1 for member data pointers (since they are // The interesting null pointer: -1 for member data pointers (since they are
// just an offset in an object, they can be zero and non-null for the first // just an offset in an object, they can be zero and non-null for the first
// member) // member)
// CHECK: [[TCNARG4]] = !MDTemplateValueParameter(name: "a", type: [[MEMINTPTR]], value: i64 -1) // CHECK: [[TCNARG4]] = !DITemplateValueParameter(name: "a", type: [[MEMINTPTR]], value: i64 -1)
// //
// In some future iteration we could possibly emit the value of a null member // In some future iteration we could possibly emit the value of a null member
// function pointer as '{ i64, i64 } zeroinitializer' as it may be handled // function pointer as '{ i64, i64 } zeroinitializer' as it may be handled
// naturally from the LLVM CodeGen side once we decide how to handle non-null // naturally from the LLVM CodeGen side once we decide how to handle non-null
// member function pointers. For now, it's simpler just to emit the 'i8 0'. // member function pointers. For now, it's simpler just to emit the 'i8 0'.
// //
// CHECK: [[TCNARG5]] = !MDTemplateValueParameter(name: "b", type: [[MEMFUNPTR]], value: i8 0) // CHECK: [[TCNARG5]] = !DITemplateValueParameter(name: "b", type: [[MEMFUNPTR]], value: i8 0)
// CHECK: [[TCNARG6]] = !MDTemplateValueParameter(name: "f", type: [[FUNPTR]], value: i8 0) // CHECK: [[TCNARG6]] = !DITemplateValueParameter(name: "f", type: [[FUNPTR]], value: i8 0)
// CHECK: [[TCNARG7]] = !MDTemplateValueParameter(tag: DW_TAG_GNU_template_parameter_pack, name: "Is", value: [[EMPTY]]) // CHECK: [[TCNARG7]] = !DITemplateValueParameter(tag: DW_TAG_GNU_template_parameter_pack, name: "Is", value: [[EMPTY]])
// FIXME: these parameters should probably be rendered as 'glb' rather than // FIXME: these parameters should probably be rendered as 'glb' rather than
// '&glb', since they're references, not pointers. // '&glb', since they're references, not pointers.
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "NN<tmpl_impl, &glb, &glb>", // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "NN<tmpl_impl, &glb, &glb>",
// CHECK-SAME: templateParams: [[NNARGS:![0-9]*]] // CHECK-SAME: templateParams: [[NNARGS:![0-9]*]]
// CHECK-SAME: identifier: "[[NNT:.*]]") // CHECK-SAME: identifier: "[[NNT:.*]]")
// CHECK: [[NNARGS]] = !{[[NNARG1:![0-9]*]], [[NNARG2:![0-9]*]], [[NNARG3:![0-9]*]]} // CHECK: [[NNARGS]] = !{[[NNARG1:![0-9]*]], [[NNARG2:![0-9]*]], [[NNARG3:![0-9]*]]}
// CHECK: [[NNARG1]] = !MDTemplateValueParameter(tag: DW_TAG_GNU_template_template_param, name: "tmpl", value: !"tmpl_impl") // CHECK: [[NNARG1]] = !DITemplateValueParameter(tag: DW_TAG_GNU_template_template_param, name: "tmpl", value: !"tmpl_impl")
// CHECK: [[NNARG2]] = !MDTemplateValueParameter(name: "lvr", type: [[INTLVR:![0-9]*]], value: i32* @glb) // CHECK: [[NNARG2]] = !DITemplateValueParameter(name: "lvr", type: [[INTLVR:![0-9]*]], value: i32* @glb)
// CHECK: [[INTLVR]] = !MDDerivedType(tag: DW_TAG_reference_type, baseType: [[INT]] // CHECK: [[INTLVR]] = !DIDerivedType(tag: DW_TAG_reference_type, baseType: [[INT]]
// CHECK: [[NNARG3]] = !MDTemplateValueParameter(name: "rvr", type: [[INTRVR:![0-9]*]], value: i32* @glb) // CHECK: [[NNARG3]] = !DITemplateValueParameter(name: "rvr", type: [[INTRVR:![0-9]*]], value: i32* @glb)
// CHECK: [[INTRVR]] = !MDDerivedType(tag: DW_TAG_rvalue_reference_type, baseType: [[INT]] // CHECK: [[INTRVR]] = !DIDerivedType(tag: DW_TAG_rvalue_reference_type, baseType: [[INT]]
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "PaddingAtEndTemplate<&PaddedObj>" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "PaddingAtEndTemplate<&PaddedObj>"
// CHECK-SAME: templateParams: [[PTOARGS:![0-9]*]] // CHECK-SAME: templateParams: [[PTOARGS:![0-9]*]]
// CHECK: [[PTOARGS]] = !{[[PTOARG1:![0-9]*]]} // CHECK: [[PTOARGS]] = !{[[PTOARG1:![0-9]*]]}
// CHECK: [[PTOARG1]] = !MDTemplateValueParameter(type: [[CONST_PADDINGATEND_PTR:![0-9]*]], value: %struct.PaddingAtEnd* @PaddedObj) // CHECK: [[PTOARG1]] = !DITemplateValueParameter(type: [[CONST_PADDINGATEND_PTR:![0-9]*]], value: %struct.PaddingAtEnd* @PaddedObj)
// CHECK: [[CONST_PADDINGATEND_PTR]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS12PaddingAtEnd", size: 64, align: 64) // CHECK: [[CONST_PADDINGATEND_PTR]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS12PaddingAtEnd", size: 64, align: 64)
// CHECK: !MDGlobalVariable(name: "tci", // CHECK: !DIGlobalVariable(name: "tci",
// CHECK-SAME: type: !"[[TCNESTED]]" // CHECK-SAME: type: !"[[TCNESTED]]"
// CHECK-SAME: variable: %"struct.TC<unsigned int, 2, &glb, &foo::e, &foo::f, &foo::g, 1, 2, 3>::nested"* @tci // CHECK-SAME: variable: %"struct.TC<unsigned int, 2, &glb, &foo::e, &foo::f, &foo::g, 1, 2, 3>::nested"* @tci
// CHECK: !MDGlobalVariable(name: "tcn" // CHECK: !DIGlobalVariable(name: "tcn"
// CHECK-SAME: type: !"[[TCNT]]" // CHECK-SAME: type: !"[[TCNT]]"
// CHECK-SAME: variable: %struct.TC* @tcn // CHECK-SAME: variable: %struct.TC* @tcn
// CHECK: !MDGlobalVariable(name: "nn" // CHECK: !DIGlobalVariable(name: "nn"
// CHECK-SAME: type: !"[[NNT]]" // CHECK-SAME: type: !"[[NNT]]"
// CHECK-SAME: variable: %struct.NN* @nn // CHECK-SAME: variable: %struct.NN* @nn
struct foo { struct foo {

View File

@ -14,7 +14,7 @@ struct C : A, B {
void C::f() { } void C::f() { }
// CHECK: !MDSubprogram(linkageName: "_ZThn{{[48]}}_N1C1fEv" // CHECK: !DISubprogram(linkageName: "_ZThn{{[48]}}_N1C1fEv"
// CHECK-SAME: line: 15 // CHECK-SAME: line: 15
// CHECK-SAME: isDefinition: true // CHECK-SAME: isDefinition: true
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}

View File

@ -10,8 +10,8 @@ namespace PR15637 {
Value<float> f; Value<float> f;
} }
// CHECK: !MDCompositeType(tag: DW_TAG_union_type, name: "Value<float>", // CHECK: !DICompositeType(tag: DW_TAG_union_type, name: "Value<float>",
// CHECK-SAME: templateParams: [[TTPARAM:![0-9]+]] // CHECK-SAME: templateParams: [[TTPARAM:![0-9]+]]
// CHECK-SAME: identifier: "_ZTSN7PR156375ValueIfEE" // CHECK-SAME: identifier: "_ZTSN7PR156375ValueIfEE"
// CHECK: [[TTPARAM]] = !{[[PARAMS:.*]]} // CHECK: [[TTPARAM]] = !{[[PARAMS:.*]]}
// CHECK: [[PARAMS]] = !MDTemplateTypeParameter(name: "T" // CHECK: [[PARAMS]] = !DITemplateTypeParameter(name: "T"

View File

@ -10,11 +10,11 @@ union E {
E e; E e;
// CHECK: !MDCompositeType(tag: DW_TAG_union_type, name: "E" // CHECK: !DICompositeType(tag: DW_TAG_union_type, name: "E"
// CHECK-SAME: line: 3 // CHECK-SAME: line: 3
// CHECK-SAME: size: 32, align: 32 // CHECK-SAME: size: 32, align: 32
// CHECK-NOT: offset: // CHECK-NOT: offset:
// CHECK-SAME: {{$}} // CHECK-SAME: {{$}}
// CHECK: !MDSubprogram(name: "bb"{{.*}}, line: 6 // CHECK: !DISubprogram(name: "bb"{{.*}}, line: 6
// CHECK: !MDSubprogram(name: "aa"{{.*}}, line: 7 // CHECK: !DISubprogram(name: "aa"{{.*}}, line: 7
// CHECK: !MDSubprogram(name: "E"{{.*}}, line: 8 // CHECK: !DISubprogram(name: "E"{{.*}}, line: 8

View File

@ -1,32 +1,32 @@
// RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-pc-win32 -g %s -o - -std=c++11 | FileCheck %s // RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-pc-win32 -g %s -o - -std=c++11 | FileCheck %s
// RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-unknown-unknown -g %s -o - -std=c++11 2>&1 | FileCheck %s --check-prefix=CHECK-ITANIUM // RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-unknown-unknown -g %s -o - -std=c++11 2>&1 | FileCheck %s --check-prefix=CHECK-ITANIUM
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid<&__uuidof(uuid)>" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid<&__uuidof(uuid)>"
// CHECK-SAME: templateParams: [[TGIARGS:![0-9]*]] // CHECK-SAME: templateParams: [[TGIARGS:![0-9]*]]
// CHECK: [[TGIARGS]] = !{[[TGIARG1:![0-9]*]]} // CHECK: [[TGIARGS]] = !{[[TGIARG1:![0-9]*]]}
// CHECK: [[TGIARG1]] = !MDTemplateValueParameter( // CHECK: [[TGIARG1]] = !DITemplateValueParameter(
// CHECK-SAME: type: [[CONST_GUID_PTR:![0-9]*]] // CHECK-SAME: type: [[CONST_GUID_PTR:![0-9]*]]
// CHECK-SAME: value: { i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab // CHECK-SAME: value: { i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab
// CHECK: [[CONST_GUID_PTR]] = !MDDerivedType(tag: DW_TAG_pointer_type // CHECK: [[CONST_GUID_PTR]] = !DIDerivedType(tag: DW_TAG_pointer_type
// CHECK-SAME: baseType: [[CONST_GUID:![0-9]*]] // CHECK-SAME: baseType: [[CONST_GUID:![0-9]*]]
// CHECK-SAME: size: 64 // CHECK-SAME: size: 64
// CHECK-SAME: align: 64 // CHECK-SAME: align: 64
// CHECK: [[CONST_GUID]] = !MDDerivedType(tag: DW_TAG_const_type // CHECK: [[CONST_GUID]] = !DIDerivedType(tag: DW_TAG_const_type
// CHECK-SAME: baseType: [[GUID:![0-9]*]] // CHECK-SAME: baseType: [[GUID:![0-9]*]]
// CHECK: [[GUID]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "_GUID" // CHECK: [[GUID]] = !DICompositeType(tag: DW_TAG_structure_type, name: "_GUID"
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid2<__uuidof(uuid)>" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid2<__uuidof(uuid)>"
// CHECK-SAME: templateParams: [[TGI2ARGS:![0-9]*]] // CHECK-SAME: templateParams: [[TGI2ARGS:![0-9]*]]
// CHECK: [[TGI2ARGS]] = !{[[TGI2ARG1:![0-9]*]]} // CHECK: [[TGI2ARGS]] = !{[[TGI2ARG1:![0-9]*]]}
// CHECK: [[TGI2ARG1]] = !MDTemplateValueParameter( // CHECK: [[TGI2ARG1]] = !DITemplateValueParameter(
// CHECK-SAME: type: [[CONST_GUID_REF:![0-9]*]] // CHECK-SAME: type: [[CONST_GUID_REF:![0-9]*]]
// CHECK-SAME: value: { i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab // CHECK-SAME: value: { i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab
// CHECK: [[CONST_GUID_REF]] = !MDDerivedType(tag: DW_TAG_reference_type, // CHECK: [[CONST_GUID_REF]] = !DIDerivedType(tag: DW_TAG_reference_type,
// CHECK-SAME: baseType: [[CONST_GUID:![0-9]*]] // CHECK-SAME: baseType: [[CONST_GUID:![0-9]*]]
// CHECK-ITANIUM: !MDCompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid<&__uuidof(uuid)>" // CHECK-ITANIUM: !DICompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid<&__uuidof(uuid)>"
// CHECK-ITANIUM-SAME: identifier: "_ZTS9tmpl_guidIXadu8__uuidoft4uuidEE" // CHECK-ITANIUM-SAME: identifier: "_ZTS9tmpl_guidIXadu8__uuidoft4uuidEE"
// CHECK-ITANIUM: !MDCompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid2<__uuidof(uuid)>" // CHECK-ITANIUM: !DICompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid2<__uuidof(uuid)>"
// CHECK-ITANIUM-SAME: identifier: "_ZTS10tmpl_guid2IXu8__uuidoft4uuidEE" // CHECK-ITANIUM-SAME: identifier: "_ZTS10tmpl_guid2IXu8__uuidoft4uuidEE"
struct _GUID; struct _GUID;

View File

@ -2,27 +2,27 @@
struct A struct A
{ {
// CHECK: !MDSubprogram(name: "a", linkageName: "_ZN1A1aEiz" // CHECK: !DISubprogram(name: "a", linkageName: "_ZN1A1aEiz"
// CHECK-SAME: line: [[@LINE+2]] // CHECK-SAME: line: [[@LINE+2]]
// CHECK-SAME: type: ![[ATY:[0-9]+]] // CHECK-SAME: type: ![[ATY:[0-9]+]]
void a(int c, ...) {} void a(int c, ...) {}
// CHECK: ![[ATY]] = !MDSubroutineType(types: ![[AARGS:[0-9]+]]) // CHECK: ![[ATY]] = !DISubroutineType(types: ![[AARGS:[0-9]+]])
// We no longer use an explicit unspecified parameter. Instead we use a trailing null to mean the function is variadic. // We no longer use an explicit unspecified parameter. Instead we use a trailing null to mean the function is variadic.
// CHECK: ![[AARGS]] = !{null, !{{[0-9]+}}, !{{[0-9]+}}, null} // CHECK: ![[AARGS]] = !{null, !{{[0-9]+}}, !{{[0-9]+}}, null}
}; };
// CHECK: !MDSubprogram(name: "b", linkageName: "_Z1biz" // CHECK: !DISubprogram(name: "b", linkageName: "_Z1biz"
// CHECK-SAME: line: [[@LINE+2]] // CHECK-SAME: line: [[@LINE+2]]
// CHECK-SAME: type: ![[BTY:[0-9]+]] // CHECK-SAME: type: ![[BTY:[0-9]+]]
void b(int c, ...) { void b(int c, ...) {
// CHECK: ![[BTY]] = !MDSubroutineType(types: ![[BARGS:[0-9]+]]) // CHECK: ![[BTY]] = !DISubroutineType(types: ![[BARGS:[0-9]+]])
// CHECK: ![[BARGS]] = !{null, !{{[0-9]+}}, null} // CHECK: ![[BARGS]] = !{null, !{{[0-9]+}}, null}
A a; A a;
// CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable, name: "fptr" // CHECK: !DILocalVariable(tag: DW_TAG_auto_variable, name: "fptr"
// CHECK-SAME: line: [[@LINE+2]] // CHECK-SAME: line: [[@LINE+2]]
// CHECK-SAME: type: ![[PST:[0-9]+]] // CHECK-SAME: type: ![[PST:[0-9]+]]
void (*fptr)(int, ...) = b; void (*fptr)(int, ...) = b;
// CHECK: ![[PST]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: ![[BTY]], // CHECK: ![[PST]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[BTY]],
} }

View File

@ -5,7 +5,7 @@
// module that has its vtable" optimization is disabled by default on // module that has its vtable" optimization is disabled by default on
// Darwin and FreeBSD. // Darwin and FreeBSD.
// //
// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "lost" // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "lost"
class A class A
{ {
virtual bool f() = 0; virtual bool f() = 0;

View File

@ -1,5 +1,5 @@
// RUN: %clang_cc1 -emit-llvm -g %s -o -| FileCheck %s // RUN: %clang_cc1 -emit-llvm -g %s -o -| FileCheck %s
void foo() { void foo() {
// CHECK: !MDBasicType(name: "wchar_t" // CHECK: !DIBasicType(name: "wchar_t"
const wchar_t w = L'x'; const wchar_t w = L'x';
} }

View File

@ -18,5 +18,5 @@ template struct AB<int>;
// CHECK: call {{.*}}@"\01??_G?$AB@H@@UAEPAXI@Z"({{.*}}) #{{[0-9]*}}, !dbg [[THUNK_LOC:![0-9]*]] // CHECK: call {{.*}}@"\01??_G?$AB@H@@UAEPAXI@Z"({{.*}}) #{{[0-9]*}}, !dbg [[THUNK_LOC:![0-9]*]]
// CHECK-LABEL: define // CHECK-LABEL: define
// CHECK: [[THUNK_VEC_DEL_DTOR:![0-9]*]] = !MDSubprogram({{.*}}function: {{.*}}@"\01??_E?$AB@H@@W3AEPAXI@Z" // CHECK: [[THUNK_VEC_DEL_DTOR:![0-9]*]] = !DISubprogram({{.*}}function: {{.*}}@"\01??_E?$AB@H@@W3AEPAXI@Z"
// CHECK: [[THUNK_LOC]] = !MDLocation(line: 15, scope: [[THUNK_VEC_DEL_DTOR]]) // CHECK: [[THUNK_LOC]] = !DILocation(line: 15, scope: [[THUNK_VEC_DEL_DTOR]])

View File

@ -6,11 +6,11 @@ class A {
}; };
A a; A a;
// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "x" // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "x"
// CHECK-SAME: baseType: [[ARRAY_TYPE:![0-9]+]] // CHECK-SAME: baseType: [[ARRAY_TYPE:![0-9]+]]
// CHECK: [[ARRAY_TYPE]] = !MDCompositeType(tag: DW_TAG_array_type, // CHECK: [[ARRAY_TYPE]] = !DICompositeType(tag: DW_TAG_array_type,
// CHECK-NOT: size: // CHECK-NOT: size:
// CHECK-SAME: align: 32 // CHECK-SAME: align: 32
// CHECK-SAME: elements: [[ELEM_TYPE:![0-9]+]] // CHECK-SAME: elements: [[ELEM_TYPE:![0-9]+]]
// CHECK: [[ELEM_TYPE]] = !{[[SUBRANGE:.*]]} // CHECK: [[ELEM_TYPE]] = !{[[SUBRANGE:.*]]}
// CHECK: [[SUBRANGE]] = !MDSubrange(count: -1) // CHECK: [[SUBRANGE]] = !DISubrange(count: -1)

View File

@ -56,7 +56,7 @@ namespace VirtualBase {
// CHECK: define void @_ZN7pr147634funcENS_3fooE // CHECK: define void @_ZN7pr147634funcENS_3fooE
// CHECK: call void @llvm.dbg.declare({{.*}}, metadata ![[F:.*]], metadata ![[EXPR:.*]]) // CHECK: call void @llvm.dbg.declare({{.*}}, metadata ![[F:.*]], metadata ![[EXPR:.*]])
// MSVC: [[VBASE_B:![0-9]+]] = distinct !MDCompositeType(tag: DW_TAG_structure_type, name: "B",{{.*}} line: 49 // MSVC: [[VBASE_B:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "B",{{.*}} line: 49
// MSVC-SAME: size: 96, align: 32 // MSVC-SAME: size: 96, align: 32
// MSVC-NOT: offset: // MSVC-NOT: offset:
// MSVC-NOT: DIFlagFwdDecl // MSVC-NOT: DIFlagFwdDecl
@ -64,10 +64,10 @@ namespace VirtualBase {
// MSVC: [[VBASE_B_DEF]] = !{[[VBASE_A_IN_B:![0-9]+]], // MSVC: [[VBASE_B_DEF]] = !{[[VBASE_A_IN_B:![0-9]+]],
// //
// Look for the vbtable offset of A, which should be 4. // Look for the vbtable offset of A, which should be 4.
// MSVC: [[VBASE_A_IN_B]] = !MDDerivedType(tag: DW_TAG_inheritance, scope: [[VBASE_B]], // MSVC: [[VBASE_A_IN_B]] = !DIDerivedType(tag: DW_TAG_inheritance, scope: [[VBASE_B]],
// MSVC-SAME: baseType: !{{[0-9]*}} // MSVC-SAME: baseType: !{{[0-9]*}}
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "B",{{.*}} line: 49, // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "B",{{.*}} line: 49,
// CHECK-SAME: size: 128, align: 64, // CHECK-SAME: size: 128, align: 64,
// CHECK-NOT: offset: // CHECK-NOT: offset:
// CHECK-NOT: DIFlagFwdDecl // CHECK-NOT: DIFlagFwdDecl
@ -75,7 +75,7 @@ namespace VirtualBase {
// CHECK: [[VBASE_B_DEF]] = !{[[VBASE_A_IN_B:![0-9]+]], // CHECK: [[VBASE_B_DEF]] = !{[[VBASE_A_IN_B:![0-9]+]],
// //
// Look for the vtable offset offset, which should be -24. // Look for the vtable offset offset, which should be -24.
// CHECK: [[VBASE_A_IN_B]] = !MDDerivedType(tag: DW_TAG_inheritance // CHECK: [[VBASE_A_IN_B]] = !DIDerivedType(tag: DW_TAG_inheritance
// CHECK-SAME: scope: !"_ZTSN11VirtualBase1BE" // CHECK-SAME: scope: !"_ZTSN11VirtualBase1BE"
// CHECK-SAME: baseType: !"_ZTSN11VirtualBase1AE" // CHECK-SAME: baseType: !"_ZTSN11VirtualBase1AE"
// CHECK-SAME: offset: 24, // CHECK-SAME: offset: 24,
@ -100,21 +100,21 @@ foo func(foo f) {
return f; // reference 'f' for now because otherwise we hit another bug return f; // reference 'f' for now because otherwise we hit another bug
} }
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
// CHECK-SAME: scope: [[PR14763:![0-9]+]] // CHECK-SAME: scope: [[PR14763:![0-9]+]]
// CHECK-SAME: identifier: "[[FOO:.*]]" // CHECK-SAME: identifier: "[[FOO:.*]]"
// CHECK: [[PR14763]] = !MDNamespace(name: "pr14763" // CHECK: [[PR14763]] = !DINamespace(name: "pr14763"
// CHECK: [[INCTYPE:![0-9]*]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "incomplete" // CHECK: [[INCTYPE:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "incomplete"
// CHECK-SAME: DIFlagFwdDecl // CHECK-SAME: DIFlagFwdDecl
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "a" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "a"
// CHECK-SAME: elements: [[A_MEM:![0-9]+]] // CHECK-SAME: elements: [[A_MEM:![0-9]+]]
// CHECK-SAME: identifier: "_ZTSN7pr162141aE" // CHECK-SAME: identifier: "_ZTSN7pr162141aE"
// CHECK: [[A_MEM]] = !{[[A_I:![0-9]*]]} // CHECK: [[A_MEM]] = !{[[A_I:![0-9]*]]}
// CHECK: [[A_I]] = !MDDerivedType(tag: DW_TAG_member, name: "i" // CHECK: [[A_I]] = !DIDerivedType(tag: DW_TAG_member, name: "i"
// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "b" // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "b"
// CHECK-SAME: DIFlagFwdDecl // CHECK-SAME: DIFlagFwdDecl
// CHECK: [[FUNC:![0-9]+]] = !MDSubprogram(name: "func", linkageName: "_ZN7pr147634funcENS_3fooE" // CHECK: [[FUNC:![0-9]+]] = !DISubprogram(name: "func", linkageName: "_ZN7pr147634funcENS_3fooE"
// CHECK-SAME: type: [[FUNC_TYPE:![0-9]*]] // CHECK-SAME: type: [[FUNC_TYPE:![0-9]*]]
// CHECK-SAME: isDefinition: true // CHECK-SAME: isDefinition: true
} }
@ -124,16 +124,16 @@ void foo() {
wchar_t d = c; wchar_t d = c;
} }
// CHECK-NOT: !MDGlobalVariable(name: "c" // CHECK-NOT: !DIGlobalVariable(name: "c"
namespace pr9608 { // also pr9600 namespace pr9608 { // also pr9600
struct incomplete; struct incomplete;
incomplete (*x)[3]; incomplete (*x)[3];
// CHECK: !MDGlobalVariable(name: "x", linkageName: "_ZN6pr96081xE" // CHECK: !DIGlobalVariable(name: "x", linkageName: "_ZN6pr96081xE"
// CHECK-SAME: type: [[INCARRAYPTR:![0-9]*]] // CHECK-SAME: type: [[INCARRAYPTR:![0-9]*]]
// CHECK-SAME: variable: [3 x i8]** @_ZN6pr96081xE // CHECK-SAME: variable: [3 x i8]** @_ZN6pr96081xE
// CHECK: [[INCARRAYPTR]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: [[INCARRAY:![0-9]+]] // CHECK: [[INCARRAYPTR]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[INCARRAY:![0-9]+]]
// CHECK: [[INCARRAY]] = !MDCompositeType(tag: DW_TAG_array_type // CHECK: [[INCARRAY]] = !DICompositeType(tag: DW_TAG_array_type
// CHECK-NOT: line: // CHECK-NOT: line:
// CHECK-NOT: size: // CHECK-NOT: size:
// CHECK-NOT: align: // CHECK-NOT: align:
@ -142,11 +142,11 @@ incomplete (*x)[3];
} }
// For some reason function arguments ended up down here // For some reason function arguments ended up down here
// CHECK: ![[F]] = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "f", arg: 1, scope: [[FUNC]] // CHECK: ![[F]] = !DILocalVariable(tag: DW_TAG_arg_variable, name: "f", arg: 1, scope: [[FUNC]]
// CHECK-SAME: type: !"[[FOO]]" // CHECK-SAME: type: !"[[FOO]]"
// CHECK: ![[EXPR]] = !MDExpression(DW_OP_deref) // CHECK: ![[EXPR]] = !DIExpression(DW_OP_deref)
// CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable, name: "c" // CHECK: !DILocalVariable(tag: DW_TAG_auto_variable, name: "c"
namespace pr16214 { namespace pr16214 {
struct a { struct a {

View File

@ -15,88 +15,88 @@ struct D { D(); D(const D&); int x; };
int d(int x) { D y[10]; return [x,y] { return y[x].x; }(); } int d(int x) { D y[10]; return [x,y] { return y[x].x; }(); }
// Randomness for file. -- 6 // Randomness for file. -- 6
// CHECK: [[FILE:.*]] = !MDFile(filename: "{{.*}}debug-lambda-expressions.cpp", // CHECK: [[FILE:.*]] = !DIFile(filename: "{{.*}}debug-lambda-expressions.cpp",
// CHECK: ![[INT:[0-9]+]] = !MDBasicType(name: "int" // CHECK: ![[INT:[0-9]+]] = !DIBasicType(name: "int"
// A: 10 // A: 10
// CHECK: ![[A_FUNC:.*]] = !MDSubprogram(name: "a"{{.*}}, line: [[A_LINE:[0-9]+]]{{.*}}, isDefinition: true // CHECK: ![[A_FUNC:.*]] = !DISubprogram(name: "a"{{.*}}, line: [[A_LINE:[0-9]+]]{{.*}}, isDefinition: true
// B: 14 // B: 14
// CHECK: ![[B_FUNC:.*]] = !MDSubprogram(name: "b"{{.*}}, line: [[B_LINE:[0-9]+]]{{.*}}, isDefinition: true // CHECK: ![[B_FUNC:.*]] = !DISubprogram(name: "b"{{.*}}, line: [[B_LINE:[0-9]+]]{{.*}}, isDefinition: true
// C: 17 // C: 17
// CHECK: ![[C_FUNC:.*]] = !MDSubprogram(name: "c"{{.*}}, line: [[C_LINE:[0-9]+]]{{.*}}, isDefinition: true // CHECK: ![[C_FUNC:.*]] = !DISubprogram(name: "c"{{.*}}, line: [[C_LINE:[0-9]+]]{{.*}}, isDefinition: true
// D: 18 // D: 18
// CHECK: ![[D_FUNC:.*]] = !MDSubprogram(name: "d"{{.*}}, line: [[D_LINE:[0-9]+]]{{.*}}, isDefinition: true // CHECK: ![[D_FUNC:.*]] = !DISubprogram(name: "d"{{.*}}, line: [[D_LINE:[0-9]+]]{{.*}}, isDefinition: true
// Back to A. -- 78 // Back to A. -- 78
// CHECK: ![[LAM_A:.*]] = !MDCompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[A_FUNC]]{{.*}}, line: [[A_LINE]], // CHECK: ![[LAM_A:.*]] = !DICompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[A_FUNC]]{{.*}}, line: [[A_LINE]],
// CHECK-SAME: elements: ![[LAM_A_ARGS:[0-9]+]] // CHECK-SAME: elements: ![[LAM_A_ARGS:[0-9]+]]
// CHECK: ![[LAM_A_ARGS]] = !{![[CON_LAM_A:[0-9]+]]} // CHECK: ![[LAM_A_ARGS]] = !{![[CON_LAM_A:[0-9]+]]}
// CHECK: ![[CON_LAM_A]] = !MDSubprogram(name: "operator()" // CHECK: ![[CON_LAM_A]] = !DISubprogram(name: "operator()"
// CHECK-SAME: scope: ![[LAM_A]] // CHECK-SAME: scope: ![[LAM_A]]
// CHECK-SAME: line: [[A_LINE]] // CHECK-SAME: line: [[A_LINE]]
// CHECK-SAME: DIFlagPublic // CHECK-SAME: DIFlagPublic
// Back to B. -- 67 // Back to B. -- 67
// CHECK: ![[LAM_B:.*]] = !MDCompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[B_FUNC]]{{.*}}, line: [[B_LINE]], // CHECK: ![[LAM_B:.*]] = !DICompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[B_FUNC]]{{.*}}, line: [[B_LINE]],
// CHECK-SAME: elements: ![[LAM_B_ARGS:[0-9]+]] // CHECK-SAME: elements: ![[LAM_B_ARGS:[0-9]+]]
// CHECK: ![[LAM_B_ARGS]] = !{![[CAP_B:[0-9]+]], ![[CON_LAM_B:[0-9]+]]} // CHECK: ![[LAM_B_ARGS]] = !{![[CAP_B:[0-9]+]], ![[CON_LAM_B:[0-9]+]]}
// CHECK: ![[CAP_B]] = !MDDerivedType(tag: DW_TAG_member, name: "x" // CHECK: ![[CAP_B]] = !DIDerivedType(tag: DW_TAG_member, name: "x"
// CHECK-SAME: scope: ![[LAM_B]] // CHECK-SAME: scope: ![[LAM_B]]
// CHECK-SAME: line: [[B_LINE]], // CHECK-SAME: line: [[B_LINE]],
// CHECK-SAME: baseType: ![[INT]] // CHECK-SAME: baseType: ![[INT]]
// CHECK: ![[CON_LAM_B]] = !MDSubprogram(name: "operator()" // CHECK: ![[CON_LAM_B]] = !DISubprogram(name: "operator()"
// CHECK-SAME: scope: ![[LAM_B]] // CHECK-SAME: scope: ![[LAM_B]]
// CHECK-SAME: line: [[B_LINE]] // CHECK-SAME: line: [[B_LINE]]
// CHECK-SAME: DIFlagPublic // CHECK-SAME: DIFlagPublic
// Back to C. -- 55 // Back to C. -- 55
// CHECK: ![[LAM_C:.*]] = !MDCompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[C_FUNC]]{{.*}}, line: [[C_LINE]], // CHECK: ![[LAM_C:.*]] = !DICompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[C_FUNC]]{{.*}}, line: [[C_LINE]],
// CHECK-SAME: elements: ![[LAM_C_ARGS:[0-9]+]] // CHECK-SAME: elements: ![[LAM_C_ARGS:[0-9]+]]
// CHECK: ![[LAM_C_ARGS]] = !{![[CAP_C:[0-9]+]], ![[CON_LAM_C:[0-9]+]]} // CHECK: ![[LAM_C_ARGS]] = !{![[CAP_C:[0-9]+]], ![[CON_LAM_C:[0-9]+]]}
// CHECK: ![[CAP_C]] = !MDDerivedType(tag: DW_TAG_member, name: "x" // CHECK: ![[CAP_C]] = !DIDerivedType(tag: DW_TAG_member, name: "x"
// CHECK-SAME: scope: ![[LAM_C]] // CHECK-SAME: scope: ![[LAM_C]]
// CHECK-SAME: line: [[C_LINE]], // CHECK-SAME: line: [[C_LINE]],
// CHECK-SAME: baseType: ![[TYPE_C_x:[0-9]+]] // CHECK-SAME: baseType: ![[TYPE_C_x:[0-9]+]]
// CHECK: ![[TYPE_C_x]] = !MDDerivedType(tag: DW_TAG_reference_type, baseType: ![[INT]] // CHECK: ![[TYPE_C_x]] = !DIDerivedType(tag: DW_TAG_reference_type, baseType: ![[INT]]
// CHECK: ![[CON_LAM_C]] = !MDSubprogram(name: "operator()" // CHECK: ![[CON_LAM_C]] = !DISubprogram(name: "operator()"
// CHECK-SAME: scope: ![[LAM_C]] // CHECK-SAME: scope: ![[LAM_C]]
// CHECK-SAME: line: [[C_LINE]] // CHECK-SAME: line: [[C_LINE]]
// CHECK-SAME: DIFlagPublic // CHECK-SAME: DIFlagPublic
// Back to D. -- 24 // Back to D. -- 24
// CHECK: ![[LAM_D:.*]] = !MDCompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[D_FUNC]]{{.*}}, line: [[D_LINE]], // CHECK: ![[LAM_D:.*]] = !DICompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[D_FUNC]]{{.*}}, line: [[D_LINE]],
// CHECK-SAME: elements: ![[LAM_D_ARGS:[0-9]+]] // CHECK-SAME: elements: ![[LAM_D_ARGS:[0-9]+]]
// CHECK: ![[LAM_D_ARGS]] = !{![[CAP_D_X:[0-9]+]], ![[CAP_D_Y:[0-9]+]], ![[CON_LAM_D:[0-9]+]]} // CHECK: ![[LAM_D_ARGS]] = !{![[CAP_D_X:[0-9]+]], ![[CAP_D_Y:[0-9]+]], ![[CON_LAM_D:[0-9]+]]}
// CHECK: ![[CAP_D_X]] = !MDDerivedType(tag: DW_TAG_member, name: "x" // CHECK: ![[CAP_D_X]] = !DIDerivedType(tag: DW_TAG_member, name: "x"
// CHECK-SAME: scope: ![[LAM_D]] // CHECK-SAME: scope: ![[LAM_D]]
// CHECK-SAME: line: [[D_LINE]], // CHECK-SAME: line: [[D_LINE]],
// CHECK: ![[CAP_D_Y]] = !MDDerivedType(tag: DW_TAG_member, name: "y" // CHECK: ![[CAP_D_Y]] = !DIDerivedType(tag: DW_TAG_member, name: "y"
// CHECK-SAME: scope: ![[LAM_D]] // CHECK-SAME: scope: ![[LAM_D]]
// CHECK-SAME: line: [[D_LINE]], // CHECK-SAME: line: [[D_LINE]],
// CHECK: ![[CON_LAM_D]] = !MDSubprogram(name: "operator()" // CHECK: ![[CON_LAM_D]] = !DISubprogram(name: "operator()"
// CHECK-SAME: scope: ![[LAM_D]] // CHECK-SAME: scope: ![[LAM_D]]
// CHECK-SAME: line: [[D_LINE]] // CHECK-SAME: line: [[D_LINE]]
// CHECK-SAME: DIFlagPublic // CHECK-SAME: DIFlagPublic
// CVAR: // CVAR:
// CHECK: !MDGlobalVariable(name: "cvar" // CHECK: !DIGlobalVariable(name: "cvar"
// CHECK-SAME: line: [[CVAR_LINE:[0-9]+]] // CHECK-SAME: line: [[CVAR_LINE:[0-9]+]]
// CHECK-SAME: type: ![[CVAR_T:[0-9]+]] // CHECK-SAME: type: ![[CVAR_T:[0-9]+]]
// CHECK: ![[CVAR_T]] = !MDCompositeType(tag: DW_TAG_class_type // CHECK: ![[CVAR_T]] = !DICompositeType(tag: DW_TAG_class_type
// CHECK-SAME: line: [[CVAR_LINE]], // CHECK-SAME: line: [[CVAR_LINE]],
// CHECK-SAME: elements: ![[CVAR_ARGS:[0-9]+]] // CHECK-SAME: elements: ![[CVAR_ARGS:[0-9]+]]
// CHECK: ![[CVAR_ARGS]] = !{!{{[0-9]+}}} // CHECK: ![[CVAR_ARGS]] = !{!{{[0-9]+}}}
// VAR: // VAR:
// CHECK: !MDGlobalVariable(name: "var" // CHECK: !DIGlobalVariable(name: "var"
// CHECK-SAME: line: [[VAR_LINE:[0-9]+]] // CHECK-SAME: line: [[VAR_LINE:[0-9]+]]
// CHECK-SAME: type: ![[VAR_T:[0-9]+]] // CHECK-SAME: type: ![[VAR_T:[0-9]+]]
// CHECK: ![[VAR_T]] = !MDCompositeType(tag: DW_TAG_class_type // CHECK: ![[VAR_T]] = !DICompositeType(tag: DW_TAG_class_type
// CHECK-SAME: line: [[VAR_LINE]], // CHECK-SAME: line: [[VAR_LINE]],
// CHECK-SAME: elements: ![[VAR_ARGS:[0-9]+]] // CHECK-SAME: elements: ![[VAR_ARGS:[0-9]+]]
// CHECK: ![[VAR_ARGS]] = !{!{{[0-9]+}}} // CHECK: ![[VAR_ARGS]] = !{!{{[0-9]+}}}

View File

@ -12,10 +12,10 @@ int D::d(int x) {
}(); }();
} }
// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "this", // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "this",
// CHECK-SAME: line: 11 // CHECK-SAME: line: 11
// CHECK-SAME: baseType: ![[POINTER:[0-9]+]] // CHECK-SAME: baseType: ![[POINTER:[0-9]+]]
// CHECK-SAME: size: 64, align: 64 // CHECK-SAME: size: 64, align: 64
// CHECK-NOT: offset: 0 // CHECK-NOT: offset: 0
// CHECK-SAME: ){{$}} // CHECK-SAME: ){{$}}
// CHECK: ![[POINTER]] = !MDDerivedType(tag: DW_TAG_pointer_type // CHECK: ![[POINTER]] = !DIDerivedType(tag: DW_TAG_pointer_type

View File

@ -19,4 +19,4 @@ void foo() {
} }
} }
// Check there is a line number entry for line 19 where b1 is destructed. // Check there is a line number entry for line 19 where b1 is destructed.
// CHECK: !MDLocation(line: 19, // CHECK: !DILocation(line: 19,

View File

@ -1,10 +1,10 @@
// RUN: %clang -g -S -emit-llvm %s -o - | FileCheck %s // RUN: %clang -g -S -emit-llvm %s -o - | FileCheck %s
// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "p" // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "p"
// CHECK-SAME: baseType: ![[INT:[0-9]+]] // CHECK-SAME: baseType: ![[INT:[0-9]+]]
// CHECK-SAME: DIFlagPublic // CHECK-SAME: DIFlagPublic
// CHECK: ![[INT]] = !MDBasicType(name: "int" // CHECK: ![[INT]] = !DIBasicType(name: "int"
// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "pr" // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "pr"
// CHECK-NOT: flags: // CHECK-NOT: flags:
// CHECK-SAME: baseType: ![[INT]] // CHECK-SAME: baseType: ![[INT]]

View File

@ -6,11 +6,11 @@
// //
// CHECK: define internal void @_GLOBAL__sub_I_globalinit_loc.cpp // CHECK: define internal void @_GLOBAL__sub_I_globalinit_loc.cpp
// CHECK: !dbg ![[DBG:.*]] // CHECK: !dbg ![[DBG:.*]]
// CHECK: !MDSubprogram(linkageName: "_GLOBAL__sub_I_globalinit_loc.cpp" // CHECK: !DISubprogram(linkageName: "_GLOBAL__sub_I_globalinit_loc.cpp"
// CHECK-NOT: line: // CHECK-NOT: line:
// CHECK-SAME: isLocal: true // CHECK-SAME: isLocal: true
// CHECK-SAME: isDefinition: true // CHECK-SAME: isDefinition: true
// CHECK: ![[DBG]] = !MDLocation(line: 0, // CHECK: ![[DBG]] = !DILocation(line: 0,
# 99 "someheader.h" # 99 "someheader.h"
class A { class A {
public: public:

View File

@ -5,7 +5,7 @@ struct __declspec(dllexport) s {
static const unsigned int ui = 0; static const unsigned int ui = 0;
}; };
// CHECK: ![[SCOPE:[0-9]+]] = !MDCompileUnit( // CHECK: ![[SCOPE:[0-9]+]] = !DICompileUnit(
// CHECK: !MDGlobalVariable(name: "ui", linkageName: "_ZN1s2uiE", scope: ![[SCOPE]], // CHECK: !DIGlobalVariable(name: "ui", linkageName: "_ZN1s2uiE", scope: ![[SCOPE]],
// CHECK-SAME: variable: i32* @_ZN1s2uiE // CHECK-SAME: variable: i32* @_ZN1s2uiE

View File

@ -25,13 +25,13 @@ int foo()
c.i = 42; c.i = 42;
return 0; return 0;
// This breakpoint should be at/before the cleanup code. // This breakpoint should be at/before the cleanup code.
// CHECK: ![[RET]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}}) // CHECK: ![[RET]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
} }
void bar() void bar()
{ {
if (!foo()) if (!foo())
// CHECK: {{.*}} = !MDLocation(line: [[@LINE+1]], scope: !{{.*}}) // CHECK: {{.*}} = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
return; return;
if (foo()) { if (foo()) {
@ -39,21 +39,21 @@ void bar()
c.i = foo(); c.i = foo();
} }
// Clang creates only a single ret instruction. Make sure it is at a useful line. // Clang creates only a single ret instruction. Make sure it is at a useful line.
// CHECK: ![[RETBAR]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}}) // CHECK: ![[RETBAR]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
} }
void baz() void baz()
{ {
if (!foo()) if (!foo())
// CHECK: ![[SCOPE1:.*]] = distinct !MDLexicalBlock({{.*}}, line: [[@LINE-1]]) // CHECK: ![[SCOPE1:.*]] = distinct !DILexicalBlock({{.*}}, line: [[@LINE-1]])
// CHECK: {{.*}} = !MDLocation(line: [[@LINE+1]], scope: ![[SCOPE1]]) // CHECK: {{.*}} = !DILocation(line: [[@LINE+1]], scope: ![[SCOPE1]])
return; return;
if (foo()) { if (foo()) {
// no cleanup // no cleanup
// CHECK: {{.*}} = !MDLocation(line: [[@LINE+2]], scope: ![[SCOPE2:.*]]) // CHECK: {{.*}} = !DILocation(line: [[@LINE+2]], scope: ![[SCOPE2:.*]])
// CHECK: ![[SCOPE2]] = distinct !MDLexicalBlock({{.*}}, line: [[@LINE-3]]) // CHECK: ![[SCOPE2]] = distinct !DILexicalBlock({{.*}}, line: [[@LINE-3]])
return; return;
} }
// CHECK: ![[RETBAZ]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}}) // CHECK: ![[RETBAZ]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
} }

View File

@ -12,10 +12,10 @@
// CHECK-NEXT: cleanup, !dbg ![[DBG3:.*]] // CHECK-NEXT: cleanup, !dbg ![[DBG3:.*]]
// CHECK-DAG: ![[CURRENT_ADDR]] = {{.*}}name: "current_address" // CHECK-DAG: ![[CURRENT_ADDR]] = {{.*}}name: "current_address"
// CHECK-DAG: ![[FOUND_IT]] = {{.*}}name: "found_it" // CHECK-DAG: ![[FOUND_IT]] = {{.*}}name: "found_it"
// CHECK-DAG: ![[DBG1]] = !MDLocation(line: 256, // CHECK-DAG: ![[DBG1]] = !DILocation(line: 256,
// CHECK-DAG: ![[DBG2]] = !MDLocation(line: 257, // CHECK-DAG: ![[DBG2]] = !DILocation(line: 257,
// CHECK-DAG: ![[DBG3]] = !MDLocation(line: 268, // CHECK-DAG: ![[DBG3]] = !DILocation(line: 268,
// CHECK-DAG: ![[DBG4]] = !MDLocation(line: 256, // CHECK-DAG: ![[DBG4]] = !DILocation(line: 256,
typedef unsigned long long uint64_t; typedef unsigned long long uint64_t;
template<class _Tp> class shared_ptr { template<class _Tp> class shared_ptr {
public: public:

View File

@ -4,12 +4,12 @@
// CHECK: define{{.*}}bar // CHECK: define{{.*}}bar
// CHECK-NOT: define // CHECK-NOT: define
// CHECK: ret {{.*}}, !dbg [[DBG:.*]] // CHECK: ret {{.*}}, !dbg [[DBG:.*]]
// CHECK: [[HPP:.*]] = !MDFile(filename: "./template.hpp", // CHECK: [[HPP:.*]] = !DIFile(filename: "./template.hpp",
// CHECK: [[SP:.*]] = !MDSubprogram(name: "bar", // CHECK: [[SP:.*]] = !DISubprogram(name: "bar",
// CHECK-SAME: file: [[HPP]], line: 22 // CHECK-SAME: file: [[HPP]], line: 22
// CHECK-SAME: isDefinition: true // CHECK-SAME: isDefinition: true
// We shouldn't need a lexical block for this function. // We shouldn't need a lexical block for this function.
// CHECK: [[DBG]] = !MDLocation(line: 23, scope: [[SP]]) // CHECK: [[DBG]] = !DILocation(line: 23, scope: [[SP]])
# 1 "./template.h" 1 # 1 "./template.h" 1

View File

@ -17,7 +17,7 @@ void Derived::VariadicFunction(...) { }
// //
// CHECK: !llvm.dbg.cu = !{![[CU:[0-9]+]]} // CHECK: !llvm.dbg.cu = !{![[CU:[0-9]+]]}
// //
// CHECK: ![[CU]] = !MDCompileUnit({{.*}} subprograms: ![[SPs:[0-9]+]] // CHECK: ![[CU]] = !DICompileUnit({{.*}} subprograms: ![[SPs:[0-9]+]]
// CHECK: ![[SPs]] = !{![[SP:[0-9]+]]} // CHECK: ![[SPs]] = !{![[SP:[0-9]+]]}
// CHECK: ![[SP]] = !MDSubprogram(name: "VariadicFunction",{{.*}} function: {{[^:]+}} @_ZN7Derived16VariadicFunctionEz // CHECK: ![[SP]] = !DISubprogram(name: "VariadicFunction",{{.*}} function: {{[^:]+}} @_ZN7Derived16VariadicFunctionEz
// CHECK: ![[LOC]] = !MDLocation({{.*}}scope: ![[SP]]) // CHECK: ![[LOC]] = !DILocation({{.*}}scope: ![[SP]])

View File

@ -4,7 +4,7 @@
// CHECK: ret i32 // CHECK: ret i32
// CHECK: landingpad {{.*}} // CHECK: landingpad {{.*}}
// CHECK-NEXT: !dbg ![[LPAD:[0-9]+]] // CHECK-NEXT: !dbg ![[LPAD:[0-9]+]]
// CHECK: ![[LPAD]] = !MDLocation(line: 24, scope: !{{.*}}) // CHECK: ![[LPAD]] = !DILocation(line: 24, scope: !{{.*}})
# 1 "/usr/include/c++/4.2.1/vector" 1 3 # 1 "/usr/include/c++/4.2.1/vector" 1 3
typedef long unsigned int __darwin_size_t; typedef long unsigned int __darwin_size_t;

View File

@ -1,9 +1,9 @@
// RUN: %clang_cc1 -std=c++11 -emit-llvm -g -o - %s | FileCheck %s // RUN: %clang_cc1 -std=c++11 -emit-llvm -g -o - %s | FileCheck %s
// Test that we are emitting debug info and base types for scoped enums. // Test that we are emitting debug info and base types for scoped enums.
// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "Color" // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Color"
// CHECK-SAME: baseType: ![[INT:[0-9]+]] // CHECK-SAME: baseType: ![[INT:[0-9]+]]
// CHECK: ![[INT]] = !MDBasicType(name: "int" // CHECK: ![[INT]] = !DIBasicType(name: "int"
enum class Color { gray }; enum class Color { gray };
void f(Color); void f(Color);
@ -11,7 +11,7 @@ void g() {
f(Color::gray); f(Color::gray);
} }
// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "Colour" // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Colour"
// CHECK-SAME: baseType: ![[INT]] // CHECK-SAME: baseType: ![[INT]]
enum struct Colour { grey }; enum struct Colour { grey };
@ -20,9 +20,9 @@ void i() {
h(Colour::grey); h(Colour::grey);
} }
// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "Couleur" // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Couleur"
// CHECK-SAME: baseType: ![[UCHAR:[0-9]+]] // CHECK-SAME: baseType: ![[UCHAR:[0-9]+]]
// CHECK: ![[UCHAR]] = !MDBasicType(name: "unsigned char" // CHECK: ![[UCHAR]] = !DIBasicType(name: "unsigned char"
enum class Couleur : unsigned char { gris }; enum class Couleur : unsigned char { gris };
void j(Couleur); void j(Couleur);

View File

@ -4,7 +4,7 @@
// rid of self-referenceing structure_types (PR21902), then it should be safe // rid of self-referenceing structure_types (PR21902), then it should be safe
// to just kill this test. // to just kill this test.
// //
// CHECK: ![[SELF:[0-9]+]] = distinct !MDCompositeType(tag: DW_TAG_structure_type, name: "B", // CHECK: ![[SELF:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "B",
// CHECK-SAME: vtableHolder: ![[SELF]] // CHECK-SAME: vtableHolder: ![[SELF]]
void foo() { void foo() {

Some files were not shown because too many files have changed in this diff Show More