@@ -90,12 +90,12 @@ class IRGenDebugInfo {
90
90
llvm::SmallString<256 > MainFilename;
91
91
llvm::BumpPtrAllocator DebugInfoNames;
92
92
StringRef CWDName; // / The current working directory.
93
- llvm::MDCompileUnit *TheCU = nullptr ; // / The current compilation unit.
94
- llvm::MDFile *MainFile = nullptr ; // / The main file.
93
+ llvm::DICompileUnit *TheCU = nullptr ; // / The current compilation unit.
94
+ llvm::DIFile *MainFile = nullptr ; // / The main file.
95
95
llvm::MDModule *MainModule = nullptr ; // / The current module.
96
96
llvm::MDNode *EntryPointFn; // / Scope of SWIFT_ENTRY_POINT_FUNCTION.
97
97
TypeAliasDecl *MetadataTypeDecl; // / The type decl for swift.type.
98
- llvm::MDType *InternalType; // / Catch-all type for opaque internal types.
98
+ llvm::DIType *InternalType; // / Catch-all type for opaque internal types.
99
99
100
100
Location LastDebugLoc; // / The last location that was emitted.
101
101
SILDebugScope *LastScope; // / The scope of that last location.
@@ -172,14 +172,13 @@ class IRGenDebugInfo {
172
172
// / \param Fn The IR representation of the function.
173
173
// / \param Rep The calling convention of the function.
174
174
// / \param Ty The signature of the function.
175
- llvm::MDSubprogram *emitFunction (SILModule &SILMod, SILDebugScope *DS,
175
+ llvm::DISubprogram *emitFunction (SILModule &SILMod, SILDebugScope *DS,
176
176
llvm::Function *Fn,
177
177
SILFunctionTypeRepresentation Rep,
178
- SILType Ty,
179
- DeclContext *DeclCtx = nullptr );
178
+ SILType Ty, DeclContext *DeclCtx = nullptr );
180
179
181
180
// / Emit debug info for a given SIL function.
182
- llvm::MDSubprogram *emitFunction (SILFunction &SILFn, llvm::Function *Fn);
181
+ llvm::DISubprogram *emitFunction (SILFunction &SILFn, llvm::Function *Fn);
183
182
184
183
// / Convenience function useful for functions without any source
185
184
// / location. Internally calls emitFunction, emits a debug
@@ -220,8 +219,8 @@ class IRGenDebugInfo {
220
219
221
220
// / Emit a dbg.declare or dbg.value intrinsic, depending on Storage.
222
221
void emitDbgIntrinsic (llvm::BasicBlock *BB, llvm::Value *Storage,
223
- llvm::MDLocalVariable *Var, llvm::MDExpression *Expr,
224
- unsigned Line, unsigned Col, llvm::MDLocalScope *Scope,
222
+ llvm::DILocalVariable *Var, llvm::DIExpression *Expr,
223
+ unsigned Line, unsigned Col, llvm::DILocalScope *Scope,
225
224
SILDebugScope *DS);
226
225
227
226
// / Create debug metadata for a global variable.
@@ -251,65 +250,62 @@ class IRGenDebugInfo {
251
250
void createImportedModule (StringRef Name, StringRef MangledPrefix,
252
251
llvm::MDModule *Module, unsigned Line);
253
252
254
- llvm::MDType *createType (DebugTypeInfo DbgTy, StringRef MangledName,
255
- llvm::MDScope *Scope, llvm::MDFile *File);
256
- llvm::MDType *getOrCreateType (DebugTypeInfo DbgTy);
257
- llvm::MDScope *getOrCreateScope (SILDebugScope *DS);
258
- llvm::MDScope *getOrCreateContext (DeclContext *DC);
253
+ llvm::DIType *createType (DebugTypeInfo DbgTy, StringRef MangledName,
254
+ llvm::DIScope *Scope, llvm::DIFile *File);
255
+ llvm::DIType *getOrCreateType (DebugTypeInfo DbgTy);
256
+ llvm::DIScope *getOrCreateScope (SILDebugScope *DS);
257
+ llvm::DIScope *getOrCreateContext (DeclContext *DC);
259
258
llvm::MDNode *createInlinedAt (SILDebugScope *Scope);
260
259
261
260
StringRef getCurrentDirname ();
262
- llvm::MDFile *getOrCreateFile (const char *Filename);
263
- llvm::MDType *getOrCreateDesugaredType (Type Ty, DebugTypeInfo DTI);
261
+ llvm::DIFile *getOrCreateFile (const char *Filename);
262
+ llvm::DIType *getOrCreateDesugaredType (Type Ty, DebugTypeInfo DTI);
264
263
StringRef getName (const FuncDecl &FD);
265
264
StringRef getName (SILLocation L);
266
265
StringRef getMangledName (TypeAliasDecl *Decl);
267
266
StringRef getMangledName (DebugTypeInfo DTI);
268
- llvm::MDTypeRefArray createParameterTypes (CanSILFunctionType FnTy,
267
+ llvm::DITypeRefArray createParameterTypes (CanSILFunctionType FnTy,
269
268
DeclContext *DeclCtx);
270
- llvm::MDTypeRefArray createParameterTypes (SILType SILTy,
269
+ llvm::DITypeRefArray createParameterTypes (SILType SILTy,
271
270
DeclContext *DeclCtx);
272
271
void createParameterType (llvm::SmallVectorImpl<llvm::Metadata *> &Parameters,
273
272
SILType CanTy, DeclContext *DeclCtx);
274
- llvm::DebugNodeArray getTupleElements (TupleType *TupleTy,
275
- llvm::MDScope *Scope,
276
- llvm::MDFile *File, unsigned Flags,
277
- DeclContext *DeclContext,
278
- unsigned &SizeInBits);
279
- llvm::MDFile *getFile (llvm::MDScope *Scope);
280
- llvm::MDModule *getOrCreateModule (llvm::MDScope *Parent, std::string Name,
281
- llvm::MDFile *File);
282
- llvm::MDScope *getModule (StringRef MangledName);
283
- llvm::DebugNodeArray getStructMembers (NominalTypeDecl *D, Type BaseTy,
284
- llvm::MDScope *Scope,
285
- llvm::MDFile *File,
286
- unsigned Flags, unsigned &SizeInBits);
287
- llvm::MDCompositeType *
273
+ llvm::DINodeArray getTupleElements (TupleType *TupleTy, llvm::DIScope *Scope,
274
+ llvm::DIFile *File, unsigned Flags,
275
+ DeclContext *DeclContext,
276
+ unsigned &SizeInBits);
277
+ llvm::DIFile *getFile (llvm::DIScope *Scope);
278
+ llvm::MDModule *getOrCreateModule (llvm::DIScope *Parent, std::string Name,
279
+ llvm::DIFile *File);
280
+ llvm::DIScope *getModule (StringRef MangledName);
281
+ llvm::DINodeArray getStructMembers (NominalTypeDecl *D, Type BaseTy,
282
+ llvm::DIScope *Scope, llvm::DIFile *File,
283
+ unsigned Flags, unsigned &SizeInBits);
284
+ llvm::DICompositeType *
288
285
createStructType (DebugTypeInfo DbgTy, NominalTypeDecl *Decl, Type BaseTy,
289
- llvm::MDScope *Scope, llvm::MDFile *File, unsigned Line,
286
+ llvm::DIScope *Scope, llvm::DIFile *File, unsigned Line,
290
287
unsigned SizeInBits, unsigned AlignInBits, unsigned Flags,
291
- llvm::MDType *DerivedFrom, unsigned RuntimeLang,
288
+ llvm::DIType *DerivedFrom, unsigned RuntimeLang,
292
289
StringRef UniqueID);
293
- llvm::MDDerivedType *createMemberType (DebugTypeInfo DTI, StringRef Name,
290
+ llvm::DIDerivedType *createMemberType (DebugTypeInfo DTI, StringRef Name,
294
291
unsigned &OffsetInBits,
295
- llvm::MDScope *Scope,
296
- llvm::MDFile *File, unsigned Flags);
297
- llvm::DebugNodeArray getEnumElements (DebugTypeInfo DbgTy, EnumDecl *D,
298
- llvm::MDScope *Scope, llvm::MDFile *File,
299
- unsigned Flags);
300
- llvm::MDCompositeType *createEnumType (DebugTypeInfo DbgTy, EnumDecl *Decl,
292
+ llvm::DIScope *Scope,
293
+ llvm::DIFile *File, unsigned Flags);
294
+ llvm::DINodeArray getEnumElements (DebugTypeInfo DbgTy, EnumDecl *D,
295
+ llvm::DIScope *Scope, llvm::DIFile *File,
296
+ unsigned Flags);
297
+ llvm::DICompositeType *createEnumType (DebugTypeInfo DbgTy, EnumDecl *Decl,
301
298
StringRef MangledName,
302
- llvm::MDScope *Scope,
303
- llvm::MDFile *File, unsigned Line,
299
+ llvm::DIScope *Scope,
300
+ llvm::DIFile *File, unsigned Line,
304
301
unsigned Flags);
305
- llvm::MDType *createPointerSizedStruct (llvm::MDScope *Scope,
306
- StringRef Name, llvm::MDFile *File,
307
- unsigned Line, unsigned Flags,
308
- StringRef MangledName);
309
- llvm::MDType *createPointerSizedStruct (llvm::MDScope *Scope,
310
- StringRef Name, llvm::MDType *PointeeTy,
311
- llvm::MDFile *File, unsigned Line,
312
- unsigned Flags, StringRef MangledName);
302
+ llvm::DIType *createPointerSizedStruct (llvm::DIScope *Scope, StringRef Name,
303
+ llvm::DIFile *File, unsigned Line,
304
+ unsigned Flags, StringRef MangledName);
305
+ llvm::DIType *createPointerSizedStruct (llvm::DIScope *Scope, StringRef Name,
306
+ llvm::DIType *PointeeTy,
307
+ llvm::DIFile *File, unsigned Line,
308
+ unsigned Flags, StringRef MangledName);
313
309
uint64_t getSizeOfBasicType (DebugTypeInfo DbgTy);
314
310
TypeAliasDecl *getMetadataType ();
315
311
};
0 commit comments