summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/BPF/BTF/global-var-inited.ll
Commit message (Collapse)AuthorAgeFilesLines
* [BPF] generate BTF_KIND_VARs for all non-static globalsYonghong Song2019-11-121-3/+17
| | | | | | | | | | | Enable to generate BTF_KIND_VARs for non-static default-section globals which is not allowed previously. Modified the existing test case to accommodate the new change. Also removed unused linkage enum members VAR_GLOBAL_TENTATIVE and VAR_GLOBAL_EXTERNAL. Differential Revision: https://reviews.llvm.org/D70145
* [BPF] handle external global properlyYonghong Song2019-03-151-0/+42
Previous commit 6bc58e6d3dbd ("[BPF] do not generate unused local/global types") tried to exclude global variable from type generation. The condition is: if (Global.hasExternalLinkage()) continue; This is not right. It also excluded initialized globals. The correct condition (from AssemblyWriter::printGlobal()) is: if (!GV->hasInitializer() && GV->hasExternalLinkage()) Out << "external "; Let us do the same in BTF type generation. Also added a test for it. Signed-off-by: Yonghong Song <yhs@fb.com> llvm-svn: 356279
OpenPOWER on IntegriCloud