llvm-6502/lib/Transforms/Utils
Chandler Carruth fdc2d0faf3 Fix two rather subtle internal vs. external linker issues.
I'll admit I'm not entirely satisfied with this change, but it seemed
the cleanest option. Other suggestions quite welcome

The issue is that the traits specializations have static methods which
return the typedef'ed PHI_iterator type. In both the IR and MI layers
this is typedef'ed to a custom iterator class defined in an anonymous
namespace giving the types and the functions returning them internal
linkage. However, because the traits specialization is defined in the
'llvm' namespace (where it has to be, specialized template lives there),
and is in turn used in the templated implementation of the SSAUpdater.
This led to the linkage conflict that Clang now warns about.

The simplest solution to me was just to define the PHI_iterator as
a nested class inside the trait specialization. That way it still
doesn't get scoped widely, it can't be accidentally reused somewhere,
etc. This is a little gross just because nested class definitions are
a little gross, but the alternatives seem more ad-hoc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158799 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-20 08:39:30 +00:00
..
AddrModeMatcher.cpp
BasicBlockUtils.cpp
BreakCriticalEdges.cpp
BuildLibCalls.cpp
CloneFunction.cpp
CloneModule.cpp
CMakeLists.txt
CmpInstAnalysis.cpp
CodeExtractor.cpp
DemoteRegToStack.cpp
InlineFunction.cpp Convert comments to proper Doxygen comments. 2012-06-09 00:01:45 +00:00
InstructionNamer.cpp
LCSSA.cpp
LLVMBuild.txt
Local.cpp Fix typos found by http://github.com/lyda/misspell-check 2012-06-02 10:20:22 +00:00
LoopSimplify.cpp
LoopUnroll.cpp LoopUnroll: always check for NULL LoopPassManager 2012-06-05 17:51:05 +00:00
LoopUnrollRuntime.cpp Fix typos found by http://github.com/lyda/misspell-check 2012-06-02 10:20:22 +00:00
LowerExpectIntrinsic.cpp
LowerInvoke.cpp
LowerSwitch.cpp PR1255: case ranges. 2012-06-02 09:42:43 +00:00
Makefile
Mem2Reg.cpp
ModuleUtils.cpp
PromoteMemoryToRegister.cpp
SimplifyCFG.cpp SimplifyCFG: fold unconditional branch to its predecessor if profitable. 2012-06-13 05:43:29 +00:00
SimplifyIndVar.cpp Remove unused private fields found by clang's new -Wunused-private-field. 2012-06-06 18:25:08 +00:00
SimplifyInstructions.cpp
SSAUpdater.cpp Fix two rather subtle internal vs. external linker issues. 2012-06-20 08:39:30 +00:00
UnifyFunctionExitNodes.cpp
Utils.cpp
ValueMapper.cpp