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
CMakeLists.txt
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
FunctionAttrs.cpp cleanup: scc_iterator consumers should use isAtEnd 2014-02-04 19:19:07 +00:00
GlobalDCE.cpp
GlobalOpt.cpp GlobalOpt: Aliases don't have sections, don't copy them when replacing 2014-02-13 02:18:36 +00:00
InlineAlways.cpp
Inliner.cpp Set default of inlinecold-threshold to 225. 2014-02-06 01:59:22 +00:00
InlineSimple.cpp
Internalize.cpp
IPConstantPropagation.cpp Update optimization passes to handle inalloca arguments 2014-01-28 02:38:36 +00:00
IPO.cpp
LLVMBuild.txt
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
PassManagerBuilder.cpp
PruneEH.cpp
StripDeadPrototypes.cpp
StripSymbols.cpp