[all-commits] [llvm/llvm-project] a7eab6: [mlir] Change ABI breaking use of NDEBUG to LLVM_E...
zero9178 via All-commits
all-commits at lists.llvm.org
Tue Aug 3 00:15:46 PDT 2021
Branch: refs/heads/release/13.x
Home: https://github.com/llvm/llvm-project
Commit: a7eab64b7c45d40154ec6f04d3a1f38b13dacfab
https://github.com/llvm/llvm-project/commit/a7eab64b7c45d40154ec6f04d3a1f38b13dacfab
Author: Markus Böck <markus.boeck02 at gmail.com>
Date: 2021-08-03 (Tue, 03 Aug 2021)
Changed paths:
M mlir/include/mlir/Interfaces/DataLayoutInterfaces.h
M mlir/lib/Interfaces/DataLayoutInterfaces.cpp
Log Message:
-----------
[mlir] Change ABI breaking use of NDEBUG to LLVM_ENABLE_ABI_BREAKING_CHECKS
The `DataLayout` class currently contains the member `layoutStack` which is hidden behind a preprocessor region dependant on the NDEBUG macro. Code wise this makes a lot of sense, as the `layoutStack` is used for extra assertions that users will want when compiling a debug build.
It however has the uncomfortable consequence of leading to a different ABI in Debug and Release builds. This I think is a bit annoying for downstream projects and others as they may want to build against a stable Release of MLIR in Release mode, but be able to debug their own project depending on MLIR.
This patch changes the related uses of NDEBUG to LLVM_ENABLE_ABI_BREAKING_CHECKS. As the macro is computed at configure time of LLVM, it may not change based on compiler settings of a downstream projects like NDEBUG would.
Differential Revision: https://reviews.llvm.org/D107227
(cherry picked from commit 97335ad13fd4f231a75163a1e5c232aed5efe921)
More information about the All-commits
mailing list