diff options
author | Christopher Ferris <cferris@google.com> | 2017-06-28 18:56:52 -0700 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2017-06-29 10:29:43 -0700 |
commit | 9416703f5b37cde61fe8f3e3572b84b21e06ea81 (patch) | |
tree | 696bf3c03b57ac3d2b27bfdb6bf43c10093862a4 /libunwindstack/Regs.cpp | |
parent | 51b4f48280bed76bdc8c1758ff6c77435989a33e (diff) | |
download | system_core-9416703f5b37cde61fe8f3e3572b84b21e06ea81.tar.gz system_core-9416703f5b37cde61fe8f3e3572b84b21e06ea81.tar.bz2 system_core-9416703f5b37cde61fe8f3e3572b84b21e06ea81.zip |
Remove assert, use CHECK instead.
- Use the CHECK macro everywhere that assert was used.
- Remove the _debug version of the tests and leave the CHECK macro so
it's always checking in the code.
Bug: 23762183
Test: Ran unit tests.
Change-Id: Ie705eedae393d0e95bb9d99f852687a11881aef1
Diffstat (limited to 'libunwindstack/Regs.cpp')
-rw-r--r-- | libunwindstack/Regs.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libunwindstack/Regs.cpp b/libunwindstack/Regs.cpp index e7d10b203..da22b078d 100644 --- a/libunwindstack/Regs.cpp +++ b/libunwindstack/Regs.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include <assert.h> #include <elf.h> #include <stdint.h> #include <sys/ptrace.h> @@ -22,6 +21,7 @@ #include <vector> +#include "Check.h" #include "Elf.h" #include "ElfInterface.h" #include "Machine.h" @@ -43,7 +43,7 @@ template <typename AddressType> bool RegsImpl<AddressType>::GetReturnAddressFromDefault(Memory* memory, uint64_t* value) { switch (return_loc_.type) { case LOCATION_REGISTER: - assert(return_loc_.value < total_regs_); + CHECK(return_loc_.value < total_regs_); *value = regs_[return_loc_.value]; return true; case LOCATION_SP_OFFSET: |