summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/Error.cpp
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2019-03-15 17:39:10 +0000
committerYonghong Song <yhs@fb.com>2019-03-15 17:39:10 +0000
commit44ed286a2f80ba9b4d8a1b0ff84f44914915ea97 (patch)
treede410bf898b5da069af4361a31b0f18356c8e49e /llvm/lib/Object/Error.cpp
parent1cbbab9277af09f2da3f7eba7391452e8da8fe79 (diff)
downloadbcm5719-llvm-44ed286a2f80ba9b4d8a1b0ff84f44914915ea97.tar.gz
bcm5719-llvm-44ed286a2f80ba9b4d8a1b0ff84f44914915ea97.zip
[BPF] handle external global properly
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
Diffstat (limited to 'llvm/lib/Object/Error.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud