@@ -2217,7 +2217,7 @@ class DILocalScope : public DIScope {
22172217 }
22182218};
22192219
2220- // / Subprogram description.
2220+ // / Subprogram description. Uses SubclassData1.
22212221class DISubprogram : public DILocalScope {
22222222 friend class LLVMContextImpl ;
22232223 friend class MDNode ;
@@ -2264,7 +2264,8 @@ class DISubprogram : public DILocalScope {
22642264
22652265 DISubprogram (LLVMContext &C, StorageType Storage, unsigned Line,
22662266 unsigned ScopeLine, unsigned VirtualIndex, int ThisAdjustment,
2267- DIFlags Flags, DISPFlags SPFlags, ArrayRef<Metadata *> Ops);
2267+ DIFlags Flags, DISPFlags SPFlags, bool UsesKeyInstructions,
2268+ ArrayRef<Metadata *> Ops);
22682269 ~DISubprogram () = default ;
22692270
22702271 static DISubprogram *
@@ -2276,24 +2277,26 @@ class DISubprogram : public DILocalScope {
22762277 DITemplateParameterArray TemplateParams, DISubprogram *Declaration,
22772278 DINodeArray RetainedNodes, DITypeArray ThrownTypes,
22782279 DINodeArray Annotations, StringRef TargetFuncName,
2279- StorageType Storage, bool ShouldCreate = true ) {
2280+ bool UsesKeyInstructions, StorageType Storage,
2281+ bool ShouldCreate = true ) {
22802282 return getImpl (Context, Scope, getCanonicalMDString (Context, Name),
22812283 getCanonicalMDString (Context, LinkageName), File, Line, Type,
22822284 ScopeLine, ContainingType, VirtualIndex, ThisAdjustment,
22832285 Flags, SPFlags, Unit, TemplateParams.get (), Declaration,
22842286 RetainedNodes.get (), ThrownTypes.get (), Annotations.get (),
22852287 getCanonicalMDString (Context, TargetFuncName),
2286- Storage, ShouldCreate);
2288+ UsesKeyInstructions, Storage, ShouldCreate);
22872289 }
2290+
22882291 LLVM_ABI static DISubprogram *
22892292 getImpl (LLVMContext &Context, Metadata *Scope, MDString *Name,
22902293 MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type,
22912294 unsigned ScopeLine, Metadata *ContainingType, unsigned VirtualIndex,
22922295 int ThisAdjustment, DIFlags Flags, DISPFlags SPFlags, Metadata *Unit,
22932296 Metadata *TemplateParams, Metadata *Declaration,
22942297 Metadata *RetainedNodes, Metadata *ThrownTypes, Metadata *Annotations,
2295- MDString *TargetFuncName, StorageType Storage ,
2296- bool ShouldCreate = true );
2298+ MDString *TargetFuncName, bool UsesKeyInstructions ,
2299+ StorageType Storage, bool ShouldCreate = true );
22972300
22982301 TempDISubprogram cloneImpl () const {
22992302 return getTemporary (getContext (), getScope (), getName (), getLinkageName (),
@@ -2302,7 +2305,7 @@ class DISubprogram : public DILocalScope {
23022305 getThisAdjustment (), getFlags (), getSPFlags (),
23032306 getUnit (), getTemplateParams (), getDeclaration (),
23042307 getRetainedNodes (), getThrownTypes (), getAnnotations (),
2305- getTargetFuncName ());
2308+ getTargetFuncName (), getKeyInstructionsEnabled () );
23062309 }
23072310
23082311public:
@@ -2315,10 +2318,11 @@ class DISubprogram : public DILocalScope {
23152318 DITemplateParameterArray TemplateParams = nullptr ,
23162319 DISubprogram *Declaration = nullptr , DINodeArray RetainedNodes = nullptr ,
23172320 DITypeArray ThrownTypes = nullptr , DINodeArray Annotations = nullptr ,
2318- StringRef TargetFuncName = " " ),
2321+ StringRef TargetFuncName = " " , bool UsesKeyInstructions = false ),
23192322 (Scope, Name, LinkageName, File, Line, Type, ScopeLine, ContainingType,
23202323 VirtualIndex, ThisAdjustment, Flags, SPFlags, Unit, TemplateParams,
2321- Declaration, RetainedNodes, ThrownTypes, Annotations, TargetFuncName))
2324+ Declaration, RetainedNodes, ThrownTypes, Annotations, TargetFuncName,
2325+ UsesKeyInstructions))
23222326
23232327 DEFINE_MDNODE_GET (
23242328 DISubprogram,
@@ -2328,10 +2332,12 @@ class DISubprogram : public DILocalScope {
23282332 DIFlags Flags, DISPFlags SPFlags, Metadata *Unit,
23292333 Metadata *TemplateParams = nullptr , Metadata *Declaration = nullptr ,
23302334 Metadata *RetainedNodes = nullptr , Metadata *ThrownTypes = nullptr ,
2331- Metadata *Annotations = nullptr , MDString *TargetFuncName = nullptr ),
2335+ Metadata *Annotations = nullptr , MDString *TargetFuncName = nullptr ,
2336+ bool UsesKeyInstructions = false ),
23322337 (Scope, Name, LinkageName, File, Line, Type, ScopeLine, ContainingType,
23332338 VirtualIndex, ThisAdjustment, Flags, SPFlags, Unit, TemplateParams,
2334- Declaration, RetainedNodes, ThrownTypes, Annotations, TargetFuncName))
2339+ Declaration, RetainedNodes, ThrownTypes, Annotations, TargetFuncName,
2340+ UsesKeyInstructions))
23352341
23362342 TempDISubprogram clone () const { return cloneImpl (); }
23372343
@@ -2342,6 +2348,8 @@ class DISubprogram : public DILocalScope {
23422348 return NewSP;
23432349 }
23442350
2351+ bool getKeyInstructionsEnabled () const { return SubclassData1; }
2352+
23452353public:
23462354 unsigned getLine () const { return Line; }
23472355 unsigned getVirtuality () const { return getSPFlags () & SPFlagVirtuality; }
0 commit comments