llvm-6502/lib/Transforms/IPO
Reid Kleckner 2798b77586 GlobalOpt: Aliases don't have sections, don't copy them when replacing
As defined in LangRef, aliases do not have sections.  However, LLVM's
GlobalAlias class inherits from GlobalValue, which means we can read and
set its section.  We should probably ban that as a separate change,
since it doesn't make much sense for an alias to have a section that
differs from its aliasee.

Fixes PR18757, where the section was being lost on the global in code
from Clang like:

extern "C" {
__attribute__((used, section("CUSTOM"))) static int in_custom_section;
}

Reviewers: rafael.espindola

Differential Revision: http://llvm-reviews.chandlerc.com/D2758

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201286 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-13 02:18:36 +00:00
..
ArgumentPromotion.cpp Update optimization passes to handle inalloca arguments 2014-01-28 02:38:36 +00:00
BarrierNoopPass.cpp Introduce a BarrierNoop pass, a hack designed to allow *some* control 2012-10-18 08:05:46 +00:00
CMakeLists.txt Introduce a BarrierNoop pass, a hack designed to allow *some* control 2012-10-18 08:05:46 +00:00
ConstantMerge.cpp Fix known typos 2014-01-24 17:20:08 +00:00
DeadArgumentElimination.cpp inalloca: Don't remove dead arguments in the presence of inalloca args 2014-02-03 20:42:49 +00:00
ExtractGV.cpp Add a fixed version of r195470 back. 2013-11-22 17:58:12 +00:00
FunctionAttrs.cpp cleanup: scc_iterator consumers should use isAtEnd 2014-02-04 19:19:07 +00:00
GlobalDCE.cpp Implement function prefix data as an IR feature. 2013-09-16 01:08:15 +00:00
GlobalOpt.cpp GlobalOpt: Aliases don't have sections, don't copy them when replacing 2014-02-13 02:18:36 +00:00
InlineAlways.cpp [PM] Split the CallGraph out from the ModulePass which creates the 2013-11-26 04:19:30 +00:00
Inliner.cpp Set default of inlinecold-threshold to 225. 2014-02-06 01:59:22 +00:00
InlineSimple.cpp [PM] Split the CallGraph out from the ModulePass which creates the 2013-11-26 04:19:30 +00:00
Internalize.cpp Reapply "LTO: add API to set strategy for -internalize" 2014-01-14 18:52:17 +00:00
IPConstantPropagation.cpp Update optimization passes to handle inalloca arguments 2014-01-28 02:38:36 +00:00
IPO.cpp Initialize the barrier pass llvm::initializeIPO 2013-12-12 20:45:08 +00:00
LLVMBuild.txt Prune redundant dependencies in LLVMBuild.txt. 2013-12-11 00:30:57 +00:00
LoopExtractor.cpp Disable most IR-level transform passes on functions marked 'optnone'. 2014-02-06 00:07:05 +00:00
Makefile
MergeFunctions.cpp Fix known typos 2014-01-24 17:20:08 +00:00
PartialInlining.cpp [PM] Split DominatorTree into a concrete analysis result object which 2014-01-13 13:07:17 +00:00
PassManagerBuilder.cpp [cleanup] Move the Dominators.h and Verifier.h headers into the IR 2014-01-13 09:26:24 +00:00
PruneEH.cpp [PM] Split the CallGraph out from the ModulePass which creates the 2013-11-26 04:19:30 +00:00
StripDeadPrototypes.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
StripSymbols.cpp Correct word hyphenations 2013-12-05 05:44:44 +00:00