llvm-project/lld/lib/ReaderWriter/MachO
Richard Smith 4451cb63fb Fix ODR violations due to abuse of LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTOR
This is a short-term fix for PR33650 aimed to get the modules build bots green again.

Remove all the places where we use the LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTOR
macros to try to locally specialize a global template for a global type. That's
not how C++ works.

Instead, we now centrally define how to format vectors of fundamental types and
of string (std::string and StringRef). We use flow formatting for the former
cases, since that's the obvious right thing to do; in the latter case, it's
less clear what the right choice is, but flow formatting is really bad for some
cases (due to very long strings), so we pick block formatting. (Many of the
cases that were using flow formatting for strings are improved by this change.)

Other than the flow -> block formatting change for some vectors of strings,
this should result in no functionality change.

Differential Revision: https://reviews.llvm.org/D34907

Corresponding LLVM change is r306878.

llvm-svn: 306880
2017-06-30 20:57:21 +00:00
..
ArchHandler.cpp Fix heap-buffer-overflow bugs identified by the Address Sanitizer 2015-02-19 20:42:23 +00:00
ArchHandler.h Change getReferenceInfo/getPairReferenceInfo to use new Error handling. NFC. 2016-03-30 20:15:06 +00:00
ArchHandler_arm.cpp Fix wrong formatting in lld introduced in r286561 (NFC) 2016-11-11 22:28:19 +00:00
ArchHandler_arm64.cpp [MachO/AArch64] Merge multiple switch cases into one. NFCI. 2017-04-15 01:42:55 +00:00
ArchHandler_x86.cpp [MachO/X86_64] Simplify isDataInCodeTransition(). 2017-04-15 01:50:51 +00:00
ArchHandler_x86_64.cpp Fix wrong formatting in lld introduced in r286561 (NFC) 2016-11-11 22:28:19 +00:00
Atoms.h Fix some Include What You Use warnings; other minor fixes. 2016-04-29 19:47:09 +00:00
CMakeLists.txt [CMake] Fix pthread handling for out-of-tree builds 2017-02-10 01:59:20 +00:00
CompactUnwindPass.cpp Prevent at compile time converting from Error::success() to Expected<T> 2016-11-11 04:29:25 +00:00
DebugInfo.h [MachO] Remove code accidentally cut'n'pasted 3 times. 2016-09-10 20:41:26 +00:00
ExecutableAtoms.h Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
File.h Change when we choose to add an LC_LOAD_DYLIB to the final image. 2016-08-11 20:10:14 +00:00
FlatNamespaceFile.h Remove dead flags. 2016-03-28 20:59:47 +00:00
GOTPass.cpp Fix wrong formatting in lld introduced in r286561 (NFC) 2016-11-11 22:28:19 +00:00
LayoutPass.cpp [Support] Move Parallel algorithms from LLD to LLVM. 2017-05-11 00:03:52 +00:00
LayoutPass.h [lld][MachO] Remove SimpleFile::definedAtoms(). 2016-06-28 18:42:33 +00:00
MachOLinkingContext.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
MachONormalizedFile.h Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
MachONormalizedFileBinaryReader.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
MachONormalizedFileBinaryUtils.h Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
MachONormalizedFileBinaryWriter.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
MachONormalizedFileFromAtoms.cpp Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC. 2017-06-10 08:06:17 +00:00
MachONormalizedFileToAtoms.cpp Tweak to match change in LLVM API, in r306315. 2017-06-26 18:43:26 +00:00
MachONormalizedFileYAML.cpp Fix ODR violations due to abuse of LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTOR 2017-06-30 20:57:21 +00:00
MachOPasses.h Add an ObjCPass to the MachO linker. 2016-01-19 21:54:21 +00:00
ObjCPass.cpp Prevent at compile time converting from Error::success() to Expected<T> 2016-11-11 04:29:25 +00:00
SectCreateFile.h Use owning pointers instead of raw pointers for Atom's to fix leaks. 2016-03-22 17:15:50 +00:00
ShimPass.cpp Prevent at compile time converting from Error::success() to Expected<T> 2016-11-11 04:29:25 +00:00
StubsPass.cpp Prevent at compile time converting from Error::success() to Expected<T> 2016-11-11 04:29:25 +00:00
TLVPass.cpp Prevent at compile time converting from Error::success() to Expected<T> 2016-11-11 04:29:25 +00:00
WriterMachO.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00