[PATCH] D30982: [ELF] - Combine LinkerScriptBase and LinkerScript<ELFT>

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 09:44:54 PDT 2017


grimar added inline comments.


================
Comment at: ELF/LinkerScript.h:292
 
-// Variable template is a C++14 feature, so we can't template
-// a global variable. Use a struct to workaround.
-template <class ELFT> struct Script { static LinkerScript<ELFT> *X; };
-template <class ELFT> LinkerScript<ELFT> *Script<ELFT>::X;
-
-extern LinkerScriptBase *ScriptBase;
+extern LinkerScriptBase *Script;
 
----------------
Also LinkerScriptBase should probably be renamed to LinkerScript, but I did not do that now to reduce amount of changes.


https://reviews.llvm.org/D30982





More information about the llvm-commits mailing list