[lld] r227183 - [Mips] Fix createMipsRelocationHandler specialization (take 2)

Denis Protivensky dprotivensky at accesssoftek.com
Tue Jan 27 00:36:35 PST 2015


Author: denis-protivensky
Date: Tue Jan 27 02:36:34 2015
New Revision: 227183

URL: http://llvm.org/viewvc/llvm-project?rev=227183&view=rev
Log:
[Mips] Fix createMipsRelocationHandler specialization (take 2)

Misread buildbot's log.
Both gcc and clang compile this fine.

Original fix reason:
gcc allows template specializations only in the same namespace
where template has been declared.

Modified:
    lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp

Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp?rev=227183&r1=227182&r2=227183&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp Tue Jan 27 02:36:34 2015
@@ -373,16 +373,22 @@ std::error_code RelocationHandler<ELFT>:
 
 } // end anon namespace
 
+namespace lld {
+namespace elf {
+
 template <>
 std::unique_ptr<TargetRelocationHandler>
-lld::elf::createMipsRelocationHandler<Mips32ELType>(MipsLinkingContext &ctx) {
+createMipsRelocationHandler<Mips32ELType>(MipsLinkingContext &ctx) {
   return std::unique_ptr<TargetRelocationHandler>(
       new RelocationHandler<Mips32ELType>(ctx));
 }
 
 template <>
 std::unique_ptr<TargetRelocationHandler>
-lld::elf::createMipsRelocationHandler<Mips64ELType>(MipsLinkingContext &ctx) {
+createMipsRelocationHandler<Mips64ELType>(MipsLinkingContext &ctx) {
   return std::unique_ptr<TargetRelocationHandler>(
       new RelocationHandler<Mips64ELType>(ctx));
 }
+
+} // elf
+} // lld





More information about the llvm-commits mailing list