Skip to content

Commit a251525

Browse files
committed
Formatting
1 parent b2475e2 commit a251525

File tree

15 files changed

+69
-45
lines changed

15 files changed

+69
-45
lines changed

clang/lib/CodeGen/CGDebugInfo.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5292,8 +5292,9 @@ void CGDebugInfo::EmitLabel(const LabelDecl *D, CGBuilderTy &Builder) {
52925292
StringRef Name = D->getName();
52935293

52945294
// Create the descriptor for the label.
5295-
auto *L =
5296-
DBuilder.createLabel(Scope, Name, Unit, Line, Column, /*IsArtificial=*/false, /*CoroSuspendIdx=*/std::nullopt, CGM.getLangOpts().Optimize);
5295+
auto *L = DBuilder.createLabel(
5296+
Scope, Name, Unit, Line, Column, /*IsArtificial=*/false,
5297+
/*CoroSuspendIdx=*/std::nullopt, CGM.getLangOpts().Optimize);
52975298

52985299
// Insert an llvm.dbg.label into the current block.
52995300
DBuilder.insertLabel(L,

llvm/include/llvm/IR/DIBuilder.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,8 @@ namespace llvm {
901901
/// \c Scope must be a \a DILocalScope, and thus its scope chain eventually
902902
/// leads to a \a DISubprogram.
903903
LLVM_ABI DILabel *createLabel(DIScope *Scope, StringRef Name, DIFile *File,
904-
unsigned LineNo, unsigned Column, bool IsArtificial,
904+
unsigned LineNo, unsigned Column,
905+
bool IsArtificial,
905906
std::optional<unsigned> CoroSuspendIdx,
906907
bool AlwaysPreserve = false);
907908

llvm/include/llvm/IR/DebugInfoMetadata.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4115,18 +4115,18 @@ class DILabel : public DINode {
41154115

41164116
static DILabel *getImpl(LLVMContext &Context, DIScope *Scope, StringRef Name,
41174117
DIFile *File, unsigned Line, unsigned Column,
4118-
bool IsArtificial, std::optional<unsigned> CoroSuspendIdx,
4118+
bool IsArtificial,
4119+
std::optional<unsigned> CoroSuspendIdx,
41194120
StorageType Storage, bool ShouldCreate = true) {
41204121
return getImpl(Context, Scope, getCanonicalMDString(Context, Name), File,
41214122
Line, Column, IsArtificial, CoroSuspendIdx, Storage,
41224123
ShouldCreate);
41234124
}
4124-
LLVM_ABI static DILabel *getImpl(LLVMContext &Context, Metadata *Scope,
4125-
MDString *Name, Metadata *File,
4126-
unsigned Line, unsigned Column,
4127-
bool IsArtificial, std::optional<unsigned> CoroSuspendIdx,
4128-
StorageType Storage,
4129-
bool ShouldCreate = true);
4125+
LLVM_ABI static DILabel *
4126+
getImpl(LLVMContext &Context, Metadata *Scope, MDString *Name, Metadata *File,
4127+
unsigned Line, unsigned Column, bool IsArtificial,
4128+
std::optional<unsigned> CoroSuspendIdx, StorageType Storage,
4129+
bool ShouldCreate = true);
41304130

41314131
TempDILabel cloneImpl() const {
41324132
return getTemporary(getContext(), getScope(), getName(), getFile(),

llvm/lib/AsmParser/LLParser.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6129,10 +6129,13 @@ bool LLParser::parseDILabel(MDNode *&Result, bool IsDistinct) {
61296129
PARSE_MD_FIELDS();
61306130
#undef VISIT_MD_FIELDS
61316131

6132-
std::optional<unsigned> CoroSuspendIdx = coroSuspendIdx.Seen ? std::optional<unsigned>(coroSuspendIdx.Val) : std::nullopt;
6132+
std::optional<unsigned> CoroSuspendIdx =
6133+
coroSuspendIdx.Seen ? std::optional<unsigned>(coroSuspendIdx.Val)
6134+
: std::nullopt;
61336135

61346136
Result = GET_OR_DISTINCT(DILabel,
6135-
(Context, scope.Val, name.Val, file.Val, line.Val, column.Val, isArtificial.Val, CoroSuspendIdx));
6137+
(Context, scope.Val, name.Val, file.Val, line.Val,
6138+
column.Val, isArtificial.Val, CoroSuspendIdx));
61366139
return false;
61376140
}
61386141

llvm/lib/Bitcode/Reader/MetadataLoader.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2260,9 +2260,10 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
22602260
}
22612261

22622262
MetadataList.assignValue(
2263-
GET_OR_DISTINCT(DILabel, (Context, getMDOrNull(Record[1]),
2264-
getMDString(Record[2]),
2265-
getMDOrNull(Record[3]), Line, Column, IsArtificial, CoroSuspendIdx)),
2263+
GET_OR_DISTINCT(DILabel,
2264+
(Context, getMDOrNull(Record[1]),
2265+
getMDString(Record[2]), getMDOrNull(Record[3]), Line,
2266+
Column, IsArtificial, CoroSuspendIdx)),
22662267
NextMetadataNo);
22672268
NextMetadataNo++;
22682269
break;

llvm/lib/Bitcode/Writer/BitcodeWriter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2351,7 +2351,8 @@ void ModuleBitcodeWriter::writeDILabel(
23512351
Record.push_back(VE.getMetadataOrNullID(N->getFile()));
23522352
Record.push_back(N->getLine());
23532353
Record.push_back(N->getColumn());
2354-
Record.push_back(N->getCoroSuspendIdx().value_or(std::numeric_limits<uint64_t>::max()));
2354+
Record.push_back(
2355+
N->getCoroSuspendIdx().value_or(std::numeric_limits<uint64_t>::max()));
23552356

23562357
Stream.EmitRecord(bitc::METADATA_LABEL, Record, Abbrev);
23572358
Record.clear();

llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,8 @@ void DwarfUnit::addBlock(DIE &Die, dwarf::Attribute Attribute,
442442
addBlock(Die, Attribute, Block->BestForm(), Block);
443443
}
444444

445-
void DwarfUnit::addSourceLine(DIE &Die, unsigned Line, unsigned Column, const DIFile *File) {
445+
void DwarfUnit::addSourceLine(DIE &Die, unsigned Line, unsigned Column,
446+
const DIFile *File) {
446447
if (Line == 0)
447448
return;
448449

llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ class DwarfUnit : public DIEUnit {
216216
DIEBlock *Block);
217217

218218
/// Add location information to specified debug information entry.
219-
void addSourceLine(DIE &Die, unsigned Line, unsigned Column, const DIFile *File);
219+
void addSourceLine(DIE &Die, unsigned Line, unsigned Column,
220+
const DIFile *File);
220221
void addSourceLine(DIE &Die, const DILocalVariable *V);
221222
void addSourceLine(DIE &Die, const DIGlobalVariable *G);
222223
void addSourceLine(DIE &Die, const DISubprogram *SP);

llvm/lib/IR/AsmWriter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2614,7 +2614,8 @@ static void writeDILabel(raw_ostream &Out, const DILabel *N,
26142614
Printer.printInt("column", N->getColumn());
26152615
Printer.printBool("isArtificial", N->isArtificial(), false);
26162616
if (N->getCoroSuspendIdx())
2617-
Printer.printInt("coroSuspendIdx", *N->getCoroSuspendIdx(), /* ShouldSkipZero */ false);
2617+
Printer.printInt("coroSuspendIdx", *N->getCoroSuspendIdx(),
2618+
/* ShouldSkipZero */ false);
26182619
Out << ")";
26192620
}
26202621

llvm/lib/IR/DIBuilder.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -946,11 +946,13 @@ DILocalVariable *DIBuilder::createParameterVariable(
946946
}
947947

948948
DILabel *DIBuilder::createLabel(DIScope *Context, StringRef Name, DIFile *File,
949-
unsigned LineNo, unsigned Column, bool IsArtificial,
950-
std::optional<unsigned> CoroSuspendIdx,
951-
bool AlwaysPreserve) {
949+
unsigned LineNo, unsigned Column,
950+
bool IsArtificial,
951+
std::optional<unsigned> CoroSuspendIdx,
952+
bool AlwaysPreserve) {
952953
auto *Scope = cast<DILocalScope>(Context);
953-
auto *Node = DILabel::get(VMContext, Scope, Name, File, LineNo, Column, IsArtificial, CoroSuspendIdx);
954+
auto *Node = DILabel::get(VMContext, Scope, Name, File, LineNo, Column,
955+
IsArtificial, CoroSuspendIdx);
954956

955957
if (AlwaysPreserve) {
956958
/// The optimizer may remove labels. If there is an interest

0 commit comments

Comments
 (0)