Make a function in a header "inline" instead of "static".
authorRui Ueyama <ruiu@google.com>
Wed, 2 Nov 2016 00:16:43 +0000 (00:16 +0000)
committerRui Ueyama <ruiu@google.com>
Wed, 2 Nov 2016 00:16:43 +0000 (00:16 +0000)
llvm-svn: 285775

lld/ELF/Memory.h

index 6ea6022992c424ca173581200cab66fd3c89b4b9..077957538db72911cf87347ef984523d4d709d07 100644 (file)
@@ -49,7 +49,7 @@ template <class T> struct SpecificAlloc : public SpecificAllocBase {
 
 // Use this arean if your object have a destructor.
 // Your destructor will be invoked from freeArena().
-template <typename T, typename... U> static T *make(U &&... Args) {
+template <typename T, typename... U> inline T *make(U &&... Args) {
   static SpecificAlloc<T> Alloc;
   return new (Alloc.Alloc.Allocate()) T(std::forward<U>(Args)...);
 }