Change-Id: I6cc4e69a914389b53bc3b52535eb6faf24897a09
Этот коммит содержится в:
Saleel Kudchadker
2020-03-10 00:02:10 -07:00
родитель 8d05d06dce
Коммит 7bba326ed1
2 изменённых файлов: 17 добавлений и 6 удалений
+3 -3
Просмотреть файл
@@ -105,9 +105,9 @@ char* demangle(const char* loweredName) {
if (!loweredName) {
return nullptr;
}
#if HIPRTC_USE_CXXABI || __linux__
#if __linux__
int status = 0;
char* demangledName = abi::__cxa_demangle(loweredName, nullptr, nullptr, &status);
char* demangledName = DEMANGLE(loweredName, nullptr, nullptr, &status);
if (status != 0) {
return nullptr;
}
@@ -122,7 +122,7 @@ char* demangle(const char* loweredName) {
}
#else
#error "Only Linux and Windows are supported"
#endif // HIPRTC_USE_CXXABI || __linux__
#endif // __linux__
return demangledName;
}
+14 -3
Просмотреть файл
@@ -23,17 +23,28 @@
#include "hip_internal.hpp"
#if HIPRTC_USE_CXXABI || __linux__
#include <cxxabi.h>
#if __linux__
#include <cstdlib>
#if HIPRTC_USE_CXXABI
#include <cxxabi.h>
#define DEMANGLE abi::__cxa_demangle
#else
extern "C" char * __cxa_demangle(const char *mangled_name, char *output_buffer,
size_t *length, int *status);
#define DEMANGLE __cxa_demangle
#endif //HIPRTC_USE_CXXABI
#elif defined(_WIN32)
#include <Windows.h>
#include <DbgHelp.h>
#define UNDECORATED_SIZE 4096
#endif // HIPRTC_USE_CXXABI || __linux__
#endif // __linux__
// This macro should be called at the beginning of every HIP RTC API.
#define HIPRTC_INIT_API(...) \