Skip to content

Commit 3b7353a

Browse files
committed
Minor code cleanups (NFC)
1 parent 54af8e4 commit 3b7353a

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,19 +100,27 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
100100
llvm::DenseSet<ModuleDecl *> ImportedModules;
101101

102102
llvm::BumpPtrAllocator DebugInfoNames;
103-
StringRef CWDName; /// The current working directory.
104-
SmallString<0> ConfigMacros; /// User-provided -D macro definitions.
105-
llvm::DICompileUnit *TheCU = nullptr; /// The current compilation unit.
106-
llvm::DIFile *MainFile = nullptr; /// The main file.
107-
llvm::DIModule *MainModule = nullptr; /// The current module.
108-
llvm::DIScope *EntryPointFn =
109-
nullptr; /// Scope of SWIFT_ENTRY_POINT_FUNCTION.
103+
/// The current working directory.
104+
StringRef CWDName;
105+
/// User-provided -D macro definitions.
106+
SmallString<0> ConfigMacros;
107+
/// The current compilation unit.
108+
llvm::DICompileUnit *TheCU = nullptr;
109+
/// The main file.
110+
llvm::DIFile *MainFile = nullptr;
111+
/// The current module.
112+
llvm::DIModule *MainModule = nullptr;
113+
/// Scope of SWIFT_ENTRY_POINT_FUNCTION.
114+
llvm::DIScope *EntryPointFn = nullptr;
110115
/// The artificial type decls for named archetypes.
111116
llvm::StringMap<TypeAliasDecl *> MetadataTypeDeclCache;
112-
llvm::DIType *InternalType; /// Catch-all type for opaque internal types.
117+
/// Catch-all type for opaque internal types.
118+
llvm::DIType *InternalType = nullptr;
113119

114-
SILLocation::DebugLoc LastDebugLoc; /// The last location that was emitted.
115-
const SILDebugScope *LastScope; /// The scope of that last location.
120+
/// The last location that was emitted.
121+
SILLocation::DebugLoc LastDebugLoc;
122+
/// The scope of that last location.
123+
const SILDebugScope *LastScope = nullptr;
116124

117125
/// Used by pushLoc.
118126
SmallVector<std::pair<SILLocation::DebugLoc, const SILDebugScope *>, 8>
@@ -1641,8 +1649,7 @@ IRGenDebugInfoImpl::IRGenDebugInfoImpl(const IRGenOptions &Opts,
16411649
llvm::Module &M,
16421650
StringRef MainOutputFilenameForDebugInfo)
16431651
: Opts(Opts), CI(CI), SM(IGM.Context.SourceMgr), M(M), DBuilder(M),
1644-
IGM(IGM), DebugPrefixMap(Opts.DebugPrefixMap),
1645-
InternalType(nullptr), LastDebugLoc({}), LastScope(nullptr) {
1652+
IGM(IGM), DebugPrefixMap(Opts.DebugPrefixMap) {
16461653
assert(Opts.DebugInfoLevel > IRGenDebugInfoLevel::None &&
16471654
"no debug info should be generated");
16481655
llvm::SmallString<256> SourcePath;

0 commit comments

Comments
 (0)