summaryrefslogtreecommitdiffstats
path: root/lib/VMCore/AsmWriter.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-06-20 08:39:30 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-06-20 08:39:30 +0000
commitfdc2d0faf321224393f1a5dbf05c3e3f88bb6e3e (patch)
treee1deff3ca25a062a9de998f4c42aa847ae8bad94 /lib/VMCore/AsmWriter.cpp
parent1880e2d34458f67a92e26953c257f2feb334ceef (diff)
downloadexternal_llvm-fdc2d0faf321224393f1a5dbf05c3e3f88bb6e3e.zip
external_llvm-fdc2d0faf321224393f1a5dbf05c3e3f88bb6e3e.tar.gz
external_llvm-fdc2d0faf321224393f1a5dbf05c3e3f88bb6e3e.tar.bz2
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
Diffstat (limited to 'lib/VMCore/AsmWriter.cpp')
0 files changed, 0 insertions, 0 deletions