Skip to content

Commit 0281db9

Browse files
committed
Rename IsDebug to WriteDebug
1 parent 5560932 commit 0281db9

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

llvm/lib/Target/DirectX/DXILWriter/DXILWriterPass.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,12 @@ static void replaceNamedMetadataArray(Module &M, StringRef Name,
151151
}
152152

153153
class EmbedDXILPass : public llvm::ModulePass {
154-
std::string writeModule(Module &M, bool HasDebugInfo, bool IsDebug) {
154+
std::string writeModule(Module &M, bool HasDebugInfo, bool WriteDebug) {
155155
std::string Data;
156156
llvm::raw_string_ostream OS(Data);
157157

158158
if (HasDebugInfo) {
159-
if (IsDebug) {
159+
if (WriteDebug) {
160160
// Replace dx.source metadata nodes with stubs.
161161
// TODO: Add /Qsource_in_debug_module flag to enable/disable this.
162162
LLVMContext &Ctx = M.getContext();
@@ -188,7 +188,6 @@ class EmbedDXILPass : public llvm::ModulePass {
188188
NMD.eraseFromParent();
189189
}
190190
}
191-
192191
const auto DIMap = DXILDebugInfoPass::run(M);
193192
WriteDXILToFile(M, OS, DIMap);
194193
return Data;
@@ -227,13 +226,13 @@ class EmbedDXILPass : public llvm::ModulePass {
227226
// Clone the module to avoid alternating it with DebugInfoPass
228227
// before stripping the debug info later.
229228
ILDBData =
230-
writeModule(*llvm::CloneModule(M), HasDebugInfo, /*IsDebug=*/true);
229+
writeModule(*llvm::CloneModule(M), HasDebugInfo, /*WriteDebug=*/true);
231230
}
232231

233232
// Clone the module to save dx.source metadata nodes from stripping, as they
234233
// are needed for DXILMetadataAnalysisWrapperPass.
235234
std::string DXILData =
236-
writeModule(*llvm::CloneModule(M), HasDebugInfo, /*IsDebug=*/false);
235+
writeModule(*llvm::CloneModule(M), HasDebugInfo, /*WriteDebug=*/false);
237236

238237
// We no longer need lifetime intrinsics after bitcode serialization, so we
239238
// simply remove them to keep the Module Verifier happy after our

0 commit comments

Comments
 (0)