summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2021-11-05 11:01:31 -0700
committerYonghong Song <yhs@fb.com>2021-11-05 11:25:17 -0700
commit3466e00716e12e32fdb100e3fcfca5c2b3e8d784 (patch)
treeb72f25b44ee1d31e246970c556931c1cd4ee0ef5 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentf64580f8d2ce5e1161857f9c89c2eee7a74c5ab8 (diff)
Reland "[Attr] support btf_type_tag attribute"
This is to revert commit f95bd18b5faa (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
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions