This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Refactor EhOutputSection
ClosedPublic

Authored by evgeny777 on Nov 24 2016, 5:44 AM.

Diff Detail

Event Timeline

evgeny777 updated this revision to Diff 79225.Nov 24 2016, 5:44 AM
evgeny777 retitled this revision from to [ELF] Refactor EhOutputSection.
evgeny777 updated this object.
evgeny777 added reviewers: ruiu, rafael.
evgeny777 set the repository for this revision to rL LLVM.
evgeny777 added a project: lld.
evgeny777 added subscribers: grimar, ikudrin, llvm-commits.
ruiu accepted this revision.Nov 24 2016, 8:57 AM
ruiu edited edge metadata.

LGTM

ELF/OutputSections.cpp
277

Use auto.

304

ditto

This revision is now accepted and ready to land.Nov 24 2016, 8:57 AM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Nov 25 2016, 8:40 AM

This breaks building on macOS:

[2814/2828] Linking CXX executable bin/lld
FAILED: bin/lld
: && /Applications/Xcode7.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DLLVM_FORCE_HEAD_REVISION -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Werror=date-time -std=c++11 -fcolor-diagnostics -O3 -isysroot /Applications/Xcode7.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-dead_strip tools/lld/tools/lld/CMakeFiles/lld.dir/lld.cpp.o -o bin/lld lib/liblldDriver.a lib/liblldCOFF.a lib/liblldELF.a lib/libLLVMSupport.a lib/liblldMachO.a lib/liblldReaderWriter.a lib/liblldYAML.a lib/libLLVMDebugInfoPDB.a lib/libLLVMLibDriver.a lib/liblldConfig.a lib/liblldCore.a lib/libLLVMOption.a lib/libLLVMAArch64CodeGen.a lib/libLLVMAArch64AsmParser.a lib/libLLVMAArch64Disassembler.a lib/libLLVMAArch64Desc.a lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64Info.a lib/libLLVMAArch64Utils.a lib/libLLVMAMDGPUCodeGen.a lib/libLLVMAMDGPUAsmParser.a lib/libLLVMAMDGPUDisassembler.a lib/libLLVMAMDGPUDesc.a lib/libLLVMAMDGPUAsmPrinter.a lib/libLLVMAMDGPUInfo.a lib/libLLVMAMDGPUUtils.a lib/libLLVMARMCodeGen.a lib/libLLVMARMAsmParser.a lib/libLLVMARMDisassembler.a lib/libLLVMARMDesc.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMInfo.a lib/libLLVMBPFCodeGen.a lib/libLLVMBPFDesc.a lib/libLLVMBPFAsmPrinter.a lib/libLLVMBPFDisassembler.a lib/libLLVMBPFInfo.a lib/libLLVMHexagonCodeGen.a lib/libLLVMHexagonAsmParser.a lib/libLLVMHexagonDisassembler.a lib/libLLVMHexagonDesc.a lib/libLLVMHexagonInfo.a lib/libLLVMLanaiCodeGen.a lib/libLLVMLanaiAsmParser.a lib/libLLVMLanaiDisassembler.a lib/libLLVMLanaiDesc.a lib/libLLVMLanaiInstPrinter.a lib/libLLVMLanaiInfo.a lib/libLLVMMipsCodeGen.a lib/libLLVMMipsAsmParser.a lib/libLLVMMipsDesc.a lib/libLLVMMipsAsmPrinter.a lib/libLLVMMipsDisassembler.a lib/libLLVMMipsInfo.a lib/libLLVMMSP430CodeGen.a lib/libLLVMMSP430Desc.a lib/libLLVMMSP430AsmPrinter.a lib/libLLVMMSP430Info.a lib/libLLVMNVPTXCodeGen.a lib/libLLVMNVPTXDesc.a lib/libLLVMNVPTXAsmPrinter.a lib/libLLVMNVPTXInfo.a lib/libLLVMPowerPCCodeGen.a lib/libLLVMPowerPCAsmParser.a lib/libLLVMPowerPCDesc.a lib/libLLVMPowerPCAsmPrinter.a lib/libLLVMPowerPCDisassembler.a lib/libLLVMPowerPCInfo.a lib/libLLVMRISCVCodeGen.a lib/libLLVMRISCVDesc.a lib/libLLVMRISCVInfo.a lib/libLLVMSparcCodeGen.a lib/libLLVMSparcAsmParser.a lib/libLLVMSparcDesc.a lib/libLLVMSparcAsmPrinter.a lib/libLLVMSparcDisassembler.a lib/libLLVMSparcInfo.a lib/libLLVMSystemZCodeGen.a lib/libLLVMSystemZAsmParser.a lib/libLLVMSystemZDisassembler.a lib/libLLVMSystemZDesc.a lib/libLLVMSystemZAsmPrinter.a lib/libLLVMSystemZInfo.a lib/libLLVMX86CodeGen.a lib/libLLVMGlobalISel.a lib/libLLVMX86AsmParser.a lib/libLLVMX86Desc.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86Utils.a lib/libLLVMX86Disassembler.a lib/libLLVMX86Info.a lib/libLLVMXCoreCodeGen.a lib/libLLVMAsmPrinter.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMDebugInfoMSF.a lib/libLLVMSelectionDAG.a lib/libLLVMXCoreDesc.a lib/libLLVMXCoreAsmPrinter.a lib/libLLVMXCoreDisassembler.a lib/libLLVMXCoreInfo.a lib/libLLVMMCDisassembler.a lib/libLLVMLTO.a lib/libLLVMObjCARCOpts.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMPasses.a lib/libLLVMCodeGen.a lib/libLLVMTarget.a lib/libLLVMBitWriter.a lib/libLLVMipo.a lib/libLLVMLinker.a lib/libLLVMIRReader.a lib/libLLVMAsmParser.a lib/libLLVMScalarOpts.a lib/libLLVMVectorize.a lib/libLLVMInstCombine.a lib/libLLVMInstrumentation.a lib/libLLVMTransformUtils.a lib/libLLVMAnalysis.a lib/libLLVMObject.a lib/libLLVMBitReader.a lib/libLLVMMCParser.a lib/libLLVMMC.a lib/libLLVMProfileData.a lib/libLLVMCore.a lib/libLLVMSupport.a lib/libLLVMDemangle.a -lcurses -lz -lm -Wl,-rpath,@loader_path/../lib && cd /b/c/b/ClangToTMacdbg_/src/third_party/llvm-build/Release+Asserts/tools/lld/tools/lld && /b/c/b/ClangToTMacdbg_/src/third_party/llvm-build-tools/cmake343/bin/cmake -E create_symlink lld /b/c/b/ClangToTMacdbg_/src/third_party/llvm-build/Release+Asserts/./bin/lld-link && cd /b/c/b/ClangToTMacdbg_/src/third_party/llvm-build/Release+Asserts/tools/lld/tools/lld && /b/c/b/ClangToTMacdbg_/src/third_party/llvm-build-tools/cmake343/bin/cmake -E create_symlink lld /b/c/b/ClangToTMacdbg_/src/third_party/llvm-build/Release+Asserts/./bin/ld.lld
Undefined symbols for architecture x86_64:

"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > lld::elf::toString<llvm::object::ELFType<(llvm::support::endianness)0, true> >(lld::elf::InputSectionBase<llvm::object::ELFType<(llvm::support::endianness)0, true> > const*)", referenced from:
    void lld::elf::EhOutputSection<llvm::object::ELFType<(llvm::support::endianness)0, true> >::addSectionAux<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, true> >(lld::elf::EhInputSection<llvm::object::ELFType<(llvm::support::endianness)0, true> >*, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, true> >) in liblldELF.a(OutputSections.cpp.o)
    void lld::elf::EhOutputSection<llvm::object::ELFType<(llvm::support::endianness)0, true> >::addSectionAux<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, false> >(lld::elf::EhInputSection<llvm::object::ELFType<(llvm::support::endianness)0, true> >*, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, false> >) in liblldELF.a(OutputSections.cpp.o)
    lld::elf::CieRecord* lld::elf::EhOutputSection<llvm::object::ELFType<(llvm::support::endianness)0, true> >::addCie<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, true> >(lld::elf::EhSectionPiece&, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, true> >) in liblldELF.a(OutputSections.cpp.o)
    bool lld::elf::EhOutputSection<llvm::object::ELFType<(llvm::support::endianness)0, true> >::isFdeLive<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, true> >(lld::elf::EhSectionPiece&, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, true> >) in liblldELF.a(OutputSections.cpp.o)
    lld::elf::CieRecord* lld::elf::EhOutputSection<llvm::object::ELFType<(llvm::support::endianness)0, true> >::addCie<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, false> >(lld::elf::EhSectionPiece&, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, false> >) in liblldELF.a(OutputSections.cpp.o)
    bool lld::elf::EhOutputSection<llvm::object::ELFType<(llvm::support::endianness)0, true> >::isFdeLive<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, false> >(lld::elf::EhSectionPiece&, llvm::ArrayRef<llvm::object::Elf_Rel_Impl<llvm::object::ELFType<(llvm::support::endianness)0, true>, false> >) in liblldELF.a(OutputSections.cpp.o)

Last good build at r287912, first bad at r287919. This looks like the most likely culprit.

https://build.chromium.org/p/chromium.fyi/builders/ClangToTMac%20%28dbg%29/builds/7110/steps/gclient%20runhooks/logs/stdio