Skip to content

Commit 280e810

Browse files
committed
Improve New object data match
1 parent 3c506bf commit 280e810

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

  • src/PowerPC_EABI_Support/src/Runtime
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
#include "PowerPC_EABI_Support/Runtime/New.h"
22

3-
extern "C" {
4-
void free(void*);
5-
}
6-
7-
__declspec(weak) void operator delete(void* arg0) throw()
8-
{
9-
if (arg0 != 0) {
10-
free(arg0);
11-
}
12-
}
13-
143
namespace std
154
{
165
class exception
176
{
187
public:
198
exception() {}
209
virtual ~exception() {}
21-
virtual const char* what() const { return "exception"; }
10+
virtual const char* what() const;
2211
};
12+
13+
__declspec(weak) const char* exception::what() const
14+
{
15+
return "exception";
16+
}
2317
}
2418

25-
static void unused()
19+
extern "C" {
20+
void free(void*);
21+
}
22+
23+
__declspec(weak) void operator delete(void* arg0) throw()
2624
{
27-
throw std::exception();
25+
if (arg0 != 0) {
26+
free(arg0);
27+
}
2828
}

0 commit comments

Comments
 (0)