mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
49135bb76c
An optional third field was added to `llvm.global_ctors` (and `llvm.global_dtors`) in r209015. Most of the code has been changed to deal with both versions of the variables. Users of the C API might create either version, the helper functions in LLVM create the two-field version, and clang now creates the three-field version. However, the BitcodeReader was changed to always upgrade to the three-field version. This created an unnecessary inconsistency in the IR before/after serializing to bitcode. This commit resolves the inconsistency by making the third field truly optional (and not upgrading in the bitcode reader). Since `llvm-link` was relying on this upgrade code, rather than deleting it I've moved it into `ModuleLinker`, where it upgrades these arrays as necessary to resolve inconsistencies between modules. The ideal resolution would be to remove the 2-field version and make the third field required. I filed PR20506 to track that. I changed `test/Bitcode/upgrade-global-ctors.ll` to a negative test and duplicated the `llvm-link` check in `test/Linker/global_ctors.ll` to check both upgrade directions. Since I came across this as part of PR5680 (serializing use-list order), I've also added the missing `verify-uselistorder` RUN line to `test/Bitcode/metadata-2.ll`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215457 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
AsmWriter.cpp | ||
AsmWriter.h | ||
AttributeImpl.h | ||
Attributes.cpp | ||
AutoUpgrade.cpp | ||
BasicBlock.cpp | ||
CMakeLists.txt | ||
Comdat.cpp | ||
ConstantFold.cpp | ||
ConstantFold.h | ||
ConstantRange.cpp | ||
Constants.cpp | ||
ConstantsContext.h | ||
Core.cpp | ||
DataLayout.cpp | ||
DebugInfo.cpp | ||
DebugLoc.cpp | ||
DiagnosticInfo.cpp | ||
DiagnosticPrinter.cpp | ||
DIBuilder.cpp | ||
Dominators.cpp | ||
Function.cpp | ||
GCOV.cpp | ||
Globals.cpp | ||
GVMaterializer.cpp | ||
InlineAsm.cpp | ||
Instruction.cpp | ||
Instructions.cpp | ||
IntrinsicInst.cpp | ||
IRBuilder.cpp | ||
IRPrintingPasses.cpp | ||
LeakDetector.cpp | ||
LeaksContext.h | ||
LegacyPassManager.cpp | ||
LLVMBuild.txt | ||
LLVMContext.cpp | ||
LLVMContextImpl.cpp | ||
LLVMContextImpl.h | ||
Makefile | ||
Mangler.cpp | ||
MDBuilder.cpp | ||
Metadata.cpp | ||
Module.cpp | ||
module.modulemap | ||
Pass.cpp | ||
PassManager.cpp | ||
PassRegistry.cpp | ||
SymbolTableListTraitsImpl.h | ||
Type.cpp | ||
TypeFinder.cpp | ||
Use.cpp | ||
UseListOrder.cpp | ||
User.cpp | ||
Value.cpp | ||
ValueSymbolTable.cpp | ||
ValueTypes.cpp | ||
Verifier.cpp |