llvm-6502/lib/IR
Rafael Espindola 6880f0e19f Fix PR18743.
The IR
@foo = private constant i32 42

is valid, but before this patch we would produce an invalid MachO from it. It
was invalid because it would use an L label in a section where the liker needs
the labels in order to atomize it.

One way of fixing it would be to just reject this IR in the backend, but that
would not be very front end friendly.

What this patch does is use an 'l' prefix in sections that we know the linker
requires symbols for atomizing them. This allows frontends to just use
private and not worry about which sections they go to or how the linker handles
them.

One small issue with this strategy is that now a symbol name depends on the
section, which is not available before codegen. This is not a problem in
practice. The reason is that it only happens with private linkage, which will
be ignored by the non codegen users (llvm-nm and llvm-ar).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201608 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18 22:24:57 +00:00
..
AsmWriter.cpp [ms-cxxabi] Add a new calling convention that swaps 'this' and 'sret' 2014-01-31 17:41:22 +00:00
AsmWriter.h
AttributeImpl.h
Attributes.cpp Begin adding docs and IR-level support for the inalloca attribute 2013-12-19 02:14:12 +00:00
AutoUpgrade.cpp Report a warning when dropping outdated debug info metadata. 2014-01-16 01:51:12 +00:00
BasicBlock.cpp
CMakeLists.txt [PM] Rename this source file to something a bit more generic before 2014-01-09 02:39:45 +00:00
ConstantFold.cpp Fold vector selects with undef elements in the condition. Fixes PR18319. 2013-12-31 19:30:47 +00:00
ConstantFold.h
Constants.cpp Add a const lookup routine to get a BlockAddress constant if there is 2014-01-19 02:13:50 +00:00
ConstantsContext.h
Core.cpp [PM] Wire up the Verifier for the new pass manager and connect it to the 2014-01-20 11:34:08 +00:00
DataLayout.cpp Fix uninitialized warning in llvm/lib/IR/DataLayout.cpp. 2014-01-13 22:04:55 +00:00
DebugInfo.cpp DebugInfo: Remove dead code, DICompositeType::addMember(DIDescriptor D) 2013-12-27 19:11:52 +00:00
DebugLoc.cpp Test commit 2014-02-05 14:23:18 +00:00
DiagnosticInfo.cpp Fix wording of warning message about invalid debug info. 2014-02-04 23:49:02 +00:00
DiagnosticPrinter.cpp Report a warning when dropping outdated debug info metadata. 2014-01-16 01:51:12 +00:00
DIBuilder.cpp DIBuilder: simplify array generation to produce true zero-length arrays 2014-02-03 23:08:54 +00:00
Dominators.cpp Remove unnecessary typename. 2014-02-16 14:12:35 +00:00
Function.cpp Add an inalloca flag to allocas 2014-01-17 23:58:17 +00:00
GCOV.cpp llvm-cov: Fix include order in GCOV.cpp 2014-02-04 21:03:17 +00:00
Globals.cpp Check that GlobalAliases don't have section or alignment. 2014-02-13 18:26:41 +00:00
GVMaterializer.cpp
InlineAsm.cpp
Instruction.cpp
Instructions.cpp Bug 18228 - Fix accepting bitcasts between vectors of pointers with a 2014-01-22 19:21:33 +00:00
IntrinsicInst.cpp
IRBuilder.cpp
IRPrintingPasses.cpp [PM] Add module and function printing passes for the new pass manager. 2014-01-12 12:15:39 +00:00
LeakDetector.cpp
LeaksContext.h
LegacyPassManager.cpp [PM] Simplify the interface exposed for IR printing passes. 2014-01-12 11:30:46 +00:00
LLVMBuild.txt
LLVMContext.cpp Add warning capabilities in LLVM. 2013-12-17 17:47:22 +00:00
LLVMContextImpl.cpp Add warning capabilities in LLVM. 2013-12-17 17:47:22 +00:00
LLVMContextImpl.h Add a const lookup routine to get a BlockAddress constant if there is 2014-01-19 02:13:50 +00:00
Makefile
Mangler.cpp Fix PR18743. 2014-02-18 22:24:57 +00:00
Metadata.cpp Fix pr14893. 2014-01-28 16:56:46 +00:00
Module.cpp Return an error_code from materializeAllPermanently. 2014-01-14 23:51:27 +00:00
Pass.cpp Disable most IR-level transform passes on functions marked 'optnone'. 2014-02-06 00:07:05 +00:00
PassManager.cpp [PM] Don't require analysis results to be const in the new pass manager. 2014-02-05 21:41:42 +00:00
PassRegistry.cpp [opt][PassInfo] Allow opt to run passes that need target machine. 2014-01-16 21:44:34 +00:00
SymbolTableListTraitsImpl.h
Type.cpp Mark some Type and EVT methods as LLVM_READONLY. 2013-12-28 16:17:26 +00:00
TypeFinder.cpp
Use.cpp
User.cpp
Value.cpp
ValueSymbolTable.cpp
ValueTypes.cpp
Verifier.cpp Check that GlobalAliases don't have section or alignment. 2014-02-13 18:26:41 +00:00