Skip to content

Commit d5937e6

Browse files
committed
IRGen: Verify round-tripping of debug info types when conditional asserts are enabled
Move this away from the compile-time NDEBUG flag.
1 parent 3aa1ed1 commit d5937e6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

include/swift/AST/IRGenOptions.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#define SWIFT_AST_IRGENOPTIONS_H
2020

2121
#include "swift/AST/LinkLibrary.h"
22+
#include "swift/Basic/Assertions.h"
2223
#include "swift/Basic/PathRemapper.h"
2324
#include "swift/Basic/Sanitizers.h"
2425
#include "swift/Basic/OptionSet.h"
@@ -655,11 +656,7 @@ class IRGenOptions {
655656
TypeInfoFilter(TypeInfoDumpFilter::All),
656657
PlatformCCallingConvention(llvm::CallingConv::C), UseCASBackend(false),
657658
CASObjMode(llvm::CASBackendMode::Native) {
658-
#ifndef NDEBUG
659-
DisableRoundTripDebugTypes = false;
660-
#else
661-
DisableRoundTripDebugTypes = true;
662-
#endif
659+
DisableRoundTripDebugTypes = !CONDITIONAL_ASSERT_enabled();
663660
}
664661

665662
/// Appends to \p os an arbitrary string representing all options which

0 commit comments

Comments
 (0)