[all-commits] [llvm/llvm-project] 703e44: [Clang] Add check for -mstack-alignment (#143124)

Feng Zou via All-commits all-commits at lists.llvm.org
Thu Jun 12 15:45:49 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 703e4460228fa5893dd0dff514ce44442b310b5e
      https://github.com/llvm/llvm-project/commit/703e4460228fa5893dd0dff514ce44442b310b5e
  Author: Feng Zou <feng.zou at intel.com>
  Date:   2025-06-13 (Fri, 13 Jun 2025)

  Changed paths:
    M clang/lib/Driver/ToolChains/Clang.cpp
    A clang/test/Driver/stack-alignment.c

  Log Message:
  -----------
  [Clang] Add check for -mstack-alignment (#143124)

Currently the assertion in Alignment.h is triggered if a wrong value is
passed -mstack-alignment option:
```
Assertion `(Value == 0 || llvm::isPowerOf2_64(Value)) && "Alignment is neither 0 nor
a power of 2"' failed.
```

Added check in clang driver for the value of -mstack-alignment option,
and emitted an error message when the wrong value was passed.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list