[PATCH] D34907: fix ODR violations due to abuse of LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTOR
Richard Smith - zygoloid via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 30 13:38:10 PDT 2017
rsmith created this revision.
Herald added subscribers: aheejin, hiraditya, sbc100, nhaehnle, sanjoy, klimek.
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 that. (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.
Repository:
rL LLVM
https://reviews.llvm.org/D34907
Files:
cfe/lib/Format/Format.cpp
cfe/lib/Tooling/Refactoring/AtomicChange.cpp
cfe/unittests/Tooling/RefactoringTest.cpp
clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
clang-tools-extra/include-fixer/find-all-symbols/SymbolInfo.cpp
clang-tools-extra/include-fixer/tool/ClangIncludeFixer.cpp
lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
llvm/include/llvm/IR/ModuleSummaryIndexYAML.h
llvm/include/llvm/ObjectYAML/DWARFYAML.h
llvm/include/llvm/ObjectYAML/MachOYAML.h
llvm/include/llvm/ObjectYAML/WasmYAML.h
llvm/include/llvm/Support/YAMLTraits.h
llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
llvm/lib/ObjectYAML/CodeViewYAMLTypes.cpp
llvm/lib/Support/AMDGPUCodeObjectMetadata.cpp
llvm/test/CodeGen/AMDGPU/code-object-metadata-from-llvm-ir-full.ll
llvm/test/MC/AMDGPU/code-object-metadata-kernel-args.s
llvm/test/MC/AMDGPU/code-object-metadata-kernel-attrs.s
llvm/test/Transforms/LowerTypeTests/export-icall.ll
llvm/tools/llvm-pdbutil/PdbYaml.cpp
llvm/unittests/Support/YAMLIOTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34907.104923.patch
Type: text/x-patch
Size: 24845 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170630/9cf29702/attachment.bin>
More information about the llvm-commits
mailing list