Skip to content

Commit 2d2b6f2

Browse files
authored
Merge pull request #41507 from apple/ktoso-patch-10
[SIL] SIL block names available in NOT-NOT-DEBUG builds.
2 parents 0704746 + c47d685 commit 2d2b6f2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

include/swift/SIL/SILModule.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ class SILModule {
363363
/// Action to be executed for serializing the SILModule.
364364
ActionCallback SerializeSILAction;
365365

366-
#if NDEBUG
366+
#ifndef NDEBUG
367367
BasicBlockNameMapType basicBlockNames;
368368
#endif
369369

@@ -456,20 +456,20 @@ class SILModule {
456456
bool isSerialized() const { return serialized; }
457457

458458
void setBasicBlockName(const SILBasicBlock *block, StringRef name) {
459-
#if NDEBUG
459+
#ifndef NDEBUG
460460
basicBlockNames[block] = name.str();
461-
#endif
461+
#endif
462462
}
463463
Optional<StringRef> getBasicBlockName(const SILBasicBlock *block) {
464-
#if NDEBUG
464+
#ifndef NDEBUG
465465
auto Known = basicBlockNames.find(block);
466466
if (Known == basicBlockNames.end())
467467
return None;
468468

469469
return StringRef(Known->second);
470-
#else
470+
#else
471471
return None;
472-
#endif
472+
#endif
473473
}
474474

475475
/// Serialize a SIL module using the configured SerializeSILAction.

0 commit comments

Comments
 (0)