mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 15:13:49 -04:00
[DebugInfo] DISubprogram flags get their own flags word. NFC.
This will hold flags specific to subprograms. In the future we could potentially free up scarce bits in DIFlags by moving subprogram-specific flags from there to the new flags word. This patch does not change IR/bitcode formats, that will be done in a follow-up. Differential Revision: https://reviews.llvm.org/D54597 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347239 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -96,11 +96,12 @@ bool applyDebugifyMetadata(Module &M,
|
||||
continue;
|
||||
|
||||
auto SPType = DIB.createSubroutineType(DIB.getOrCreateTypeArray(None));
|
||||
bool IsLocalToUnit = F.hasPrivateLinkage() || F.hasInternalLinkage();
|
||||
auto SP =
|
||||
DIB.createFunction(CU, F.getName(), F.getName(), File, NextLine, SPType,
|
||||
IsLocalToUnit, /*isDefinition=*/true, NextLine,
|
||||
DINode::FlagZero, /*isOptimized=*/true);
|
||||
DISubprogram::DISPFlags SPFlags =
|
||||
DISubprogram::SPFlagDefinition | DISubprogram::SPFlagOptimized;
|
||||
if (F.hasPrivateLinkage() || F.hasInternalLinkage())
|
||||
SPFlags |= DISubprogram::SPFlagLocalToUnit;
|
||||
auto SP = DIB.createFunction(CU, F.getName(), F.getName(), File, NextLine,
|
||||
SPType, NextLine, DINode::FlagZero, SPFlags);
|
||||
F.setSubprogram(SP);
|
||||
for (BasicBlock &BB : F) {
|
||||
// Attach debug locations.
|
||||
|
||||
Reference in New Issue
Block a user