Handout
This commit is contained in:
21
compiler/libcxx.cc
Normal file
21
compiler/libcxx.cc
Normal file
@@ -0,0 +1,21 @@
|
||||
/*! \file
|
||||
* \brief C++ runtime support functions
|
||||
*/
|
||||
|
||||
#include "../types.h"
|
||||
|
||||
void* operator new(size_t, void* place) { return place; }
|
||||
|
||||
void operator delete(void* ptr) { (void)ptr; }
|
||||
|
||||
void operator delete(void* ptr, size_t size) {
|
||||
(void)ptr;
|
||||
(void)size;
|
||||
}
|
||||
|
||||
extern "C" [[noreturn]] void __cxa_pure_virtual() {
|
||||
// Pure virtual function was called -- this if obviously not valid,
|
||||
// therefore we wait infinitely.
|
||||
while (true) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user