Sam Clegg ecbcefd693 [clang][WebAssemmbly] Call TargetInfo::adjust in derived method.
The superclass method handles a bunch of useful things. For example
it applies flags such as `-fnew-alignment` which doesn't work without
this patch.

Differential Revision: https://reviews.llvm.org/D118573
2022-02-10 16:04:06 -08:00

11 lines
461 B
C++

// RUN: %clang_cc1 -std=c++1z %s -verify -triple x86_64-linux-gnu -DALIGN=16
// RUN: %clang_cc1 -std=c++1z %s -verify -fnew-alignment=2 -DALIGN=2
// RUN: %clang_cc1 -std=c++1z %s -verify -fnew-alignment=256 -DALIGN=256
// RUN: %clang_cc1 -std=c++1z %s -verify -triple wasm32-unknown-unknown -fnew-alignment=256 -DALIGN=256
// expected-no-diagnostics
#if ALIGN != __STDCPP_DEFAULT_NEW_ALIGNMENT__
#error wrong value for __STDCPP_DEFAULT_NEW_ALIGNMENT__
#endif