[all-commits] [llvm/llvm-project] 334ac8: Fix the check for regparm in FunctionType::ExtInfo

Momchil Velikov via All-commits all-commits at lists.llvm.org
Mon Apr 27 08:01:56 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 334ac81054018c3ae6058a0bf12e9c9363bd50ad
      https://github.com/llvm/llvm-project/commit/334ac81054018c3ae6058a0bf12e9c9363bd50ad
  Author: Momchil Velikov <momchil.velikov at arm.com>
  Date:   2020-04-27 (Mon, 27 Apr 2020)

  Changed paths:
    M clang/include/clang/AST/Type.h
    A clang/test/AST/spurious-regparm.c

  Log Message:
  -----------
  Fix the check for regparm in FunctionType::ExtInfo

`getHasRegParm()` was working under the assumption that the RegParm
bits are the last field, which is no longer true, after adding the
`NoCfCheck` and `CmseNSCall` fields.

This causes a spurious "regparm 0" attribute to appear when a function
type is declared with either `__attribute__((nocf_check))` or
`__attribute__((cmse_nonsecure_call))`.

Differential Revision: https://reviews.llvm.org/D77270




More information about the All-commits mailing list