-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reland "[Attr] support btf_type_tag attribute"
This is to revert commit f95bd18 (Revert "[Attr] support btf_type_tag attribute") plus a bug fix. Previous change failed to handle cases like below: $ cat reduced.c void a(*); void a() {} $ clang -c reduced.c -O2 -g In such cases, during clang IR generation, for function a(), CGCodeGen has numParams = 1 for FunctionType. But for FunctionTypeLoc we have FuncTypeLoc.NumParams = 0. By using FunctionType.numParams as the bound to access FuncTypeLoc params, a random crash is triggered. The bug fix is to check against FuncTypeLoc.NumParams before accessing FuncTypeLoc.getParam(Idx). Differential Revision: https://reviews.llvm.org/D111199
- Loading branch information
1 parent
f64580f
commit 3466e00
Showing
9 changed files
with
363 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.