[all-commits] [llvm/llvm-project] 2c67f2: [llvm] Add format check for MCSubtargetFeatures (#...

Georgiy Samoylov via All-commits all-commits at lists.llvm.org
Thu Apr 16 07:18:04 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2c67f2fdfc41afd9acfe28e3cb42850a97f1db54
      https://github.com/llvm/llvm-project/commit/2c67f2fdfc41afd9acfe28e3cb42850a97f1db54
  Author: Georgiy Samoylov <Ignitor21838 at gmail.com>
  Date:   2026-04-16 (Thu, 16 Apr 2026)

  Changed paths:
    M llvm/include/llvm/MC/TargetRegistry.h
    M llvm/lib/MC/TargetRegistry.cpp
    M llvm/unittests/MC/TargetRegistry.cpp

  Log Message:
  -----------
  [llvm] Add format check for MCSubtargetFeatures (#180943)

`SubtargetFeatures` class has next constraints:
https://github.com/llvm/llvm-project/blob/c9d065abc15846deb95a23fb0b3e1855d3d26314/llvm/include/llvm/TargetParser/SubtargetFeature.h#L167-L174

At this moment feature string isn't checked for fitting in such format.
This leads to assertion failure, for example in lldb:
https://github.com/llvm/llvm-project/pull/180901, when features from
user's input don't meet the requirements.

With implementing additional format check we can avoid such problems.



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