forked from OSchip/llvm-project
[lldb] Fix some tests failing with gmodules after change to stdlib.h
Commit 82b47b2978
changes the way the stdlib.h
header is structured which seems to cause strange lookup failures in the modules
build. This updates a few failing tests so that they pass with the new
behavior of stdlib.h.
See the discussion in https://reviews.llvm.org/rG82b47b2978405f802a33b00d046e6f18ef6a47be
This commit is contained in:
parent
f4e920720d
commit
cfb29e4a54
|
@ -1,5 +1,6 @@
|
|||
#include <cstdlib>
|
||||
#include <utility>
|
||||
#include <cmath>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
std::size_t f = argc;
|
||||
|
|
|
@ -4,7 +4,7 @@ int counter = 0;
|
|||
|
||||
void inc_counter() { ++counter; }
|
||||
|
||||
void do_abort() { abort(); }
|
||||
void do_abort() { std::abort(); }
|
||||
|
||||
int main() {
|
||||
return 0; // break here
|
||||
|
|
|
@ -4,8 +4,8 @@ int side_effect = 0;
|
|||
|
||||
struct B { int dummy = 2324; };
|
||||
struct C {
|
||||
void *operator new(size_t size) { C* r = ::new C; r->custom_new = true; return r; }
|
||||
void *operator new[](size_t size) { C* r = static_cast<C*>(std::malloc(size)); r->custom_new = true; return r; }
|
||||
void *operator new(std::size_t size) { C* r = ::new C; r->custom_new = true; return r; }
|
||||
void *operator new[](std::size_t size) { C* r = static_cast<C*>(std::malloc(size)); r->custom_new = true; return r; }
|
||||
void operator delete(void *p) { std::free(p); side_effect = 1; }
|
||||
void operator delete[](void *p) { std::free(p); side_effect = 2; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue