Skip to content

Commit 9217566

Browse files
committed
NFC: Fix some warnings.
1 parent b6ececb commit 9217566

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

lib/DependencyScan/DependencyScanningTool.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ void DependencyScannerDiagnosticCollectingConsumer::addDiagnostic(SourceManager
9292

9393
std::string ResultingMessage;
9494
llvm::raw_string_ostream Stream(ResultingMessage);
95-
const llvm::SourceMgr &rawSM = SM.getLLVMSourceMgr();
96-
95+
9796
// Actually substitute the diagnostic arguments into the diagnostic text.
9897
llvm::SmallString<256> Text;
9998
llvm::raw_svector_ostream Out(Text);

lib/IRGen/GenStruct.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,9 @@ namespace {
326326
};
327327

328328
/// A type implementation for loadable record types imported from Clang.
329-
class LoadableClangRecordTypeInfo final :
330-
public StructTypeInfoBase<LoadableClangRecordTypeInfo, LoadableTypeInfo,
331-
ClangFieldInfo> {
332-
IRGenModule &IGM;
329+
class LoadableClangRecordTypeInfo final
330+
: public StructTypeInfoBase<LoadableClangRecordTypeInfo, LoadableTypeInfo,
331+
ClangFieldInfo> {
333332
const clang::RecordDecl *ClangDecl;
334333

335334
template <class Fn>
@@ -356,14 +355,14 @@ namespace {
356355

357356
public:
358357
LoadableClangRecordTypeInfo(ArrayRef<ClangFieldInfo> fields,
359-
unsigned explosionSize, IRGenModule &IGM,
360-
llvm::Type *storageType, Size size,
361-
SpareBitVector &&spareBits, Alignment align,
358+
unsigned explosionSize, llvm::Type *storageType,
359+
Size size, SpareBitVector &&spareBits,
360+
Alignment align,
362361
const clang::RecordDecl *clangDecl)
363362
: StructTypeInfoBase(StructTypeInfoKind::LoadableClangRecordTypeInfo,
364363
fields, explosionSize, storageType, size,
365364
std::move(spareBits), align, IsPOD, IsFixedSize),
366-
IGM(IGM), ClangDecl(clangDecl) {}
365+
ClangDecl(clangDecl) {}
367366

368367
TypeLayoutEntry *buildTypeLayoutEntry(IRGenModule &IGM,
369368
SILType T) const override {
@@ -1049,7 +1048,7 @@ class ClangRecordLowering {
10491048
FieldInfos, llvmType, TotalStride, TotalAlignment, ClangDecl);
10501049
}
10511050
return LoadableClangRecordTypeInfo::create(
1052-
FieldInfos, NextExplosionIndex, IGM, llvmType, TotalStride,
1051+
FieldInfos, NextExplosionIndex, llvmType, TotalStride,
10531052
std::move(SpareBits), TotalAlignment, ClangDecl);
10541053
}
10551054

0 commit comments

Comments
 (0)