//===-- ubsan_value.cpp ---------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // Representation of a runtime value, as marshaled from the generated code to // the ubsan runtime. // //===----------------------------------------------------------------------===// #include "ubsan_platform.h" #if CAN_SANITIZE_UB #include "ubsan_value.h" #include "sanitizer_common/sanitizer_common.h" #include "sanitizer_common/sanitizer_libc.h" #include "sanitizer_common/sanitizer_mutex.h" #if SANITIZER_APPLE #include <dlfcn.h> #endif usingnamespace__ubsan; ObjCGetClassNameTy; const char *__ubsan::getObjCClassName(ValueHandle Pointer) { … } SIntMax Value::getSIntValue() const { … } UIntMax Value::getUIntValue() const { … } UIntMax Value::getPositiveIntValue() const { … } /// Get the floating-point value of this object, extended to a long double. /// These are always passed by address (our calling convention doesn't allow /// them to be passed in floating-point registers, so this has little cost). FloatMax Value::getFloatValue() const { … } #endif // CAN_SANITIZE_UB