Demangle the name of components when a GNU/Clang compiler is being used
This commit is contained in:
parent
c123965098
commit
ac12773e6c
|
@ -10,6 +10,9 @@
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <typeindex>
|
#include <typeindex>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#include <cxxabi.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "../parsing/ParseComponents.hpp"
|
#include "../parsing/ParseComponents.hpp"
|
||||||
|
|
||||||
|
@ -86,7 +89,13 @@ public:
|
||||||
const optional<task>& currentTask = taskMap.at(id);
|
const optional<task>& currentTask = taskMap.at(id);
|
||||||
if (currentTask.has_value()) currentTask.value()(tree, i);
|
if (currentTask.has_value()) currentTask.value()(tree, i);
|
||||||
} catch (const out_of_range&) {
|
} catch (const out_of_range&) {
|
||||||
throw Yerbacon::Exception(string(id.name()) += " is not supported by the current target");
|
throw Yerbacon::Exception(string(
|
||||||
|
#ifndef __GNUC__
|
||||||
|
id.name()
|
||||||
|
#else
|
||||||
|
abi::__cxa_demangle(id.name(), nullptr, nullptr, nullptr)
|
||||||
|
#endif
|
||||||
|
) += " is not supported by the current target");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return output.str();
|
return output.str();
|
||||||
|
|
Loading…
Reference in New Issue