[all-commits] [llvm/llvm-project] ed8605: Add static assert to ID Table to make sure aux tar...

Erich Keane via All-commits all-commits at lists.llvm.org
Thu May 7 12:50:13 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ed86058b53f971ed93cc79c8b4fc76da37ca0664
      https://github.com/llvm/llvm-project/commit/ed86058b53f971ed93cc79c8b4fc76da37ca0664
  Author: Erich Keane <erich.keane at intel.com>
  Date:   2020-05-07 (Thu, 07 May 2020)

  Changed paths:
    M clang/include/clang/Basic/IdentifierTable.h
    M clang/include/clang/Basic/TargetBuiltins.h
    M clang/lib/Basic/IdentifierTable.cpp

  Log Message:
  -----------
  Add static assert to ID Table to make sure aux targets work right.

I discovered that the limit on possible builtins managed by this
ObjCOrBuiltin variable is too low when combining large targets, since
aux-targets are appended to the targets list. A runtime assert exists
for this, however this patch creates a static-assert as well.

The logic for said static-assert is to make sure we have the room for
the aux-target and target to both be the largest list, which makes sure
we have room for all possible combinations.

I also incremented the number of bits by 1, since I discovered this
currently broken.  The current bit-count was 36, so this doesn't
increase any size.




More information about the All-commits mailing list