[llvm-branch-commits] [llvm] 04b0a4e - Provide anchor for compiler extensions

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jun 25 23:05:54 PDT 2020


Author: Serge Guelton
Date: 2020-06-25T16:14:38-07:00
New Revision: 04b0a4e22e3b4549f9d241f8a9f37eebecb62a31

URL: https://github.com/llvm/llvm-project/commit/04b0a4e22e3b4549f9d241f8a9f37eebecb62a31
DIFF: https://github.com/llvm/llvm-project/commit/04b0a4e22e3b4549f9d241f8a9f37eebecb62a31.diff

LOG: Provide anchor for compiler extensions

Added: 
    

Modified: 
    llvm/lib/Extensions/Extensions.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Extensions/Extensions.cpp b/llvm/lib/Extensions/Extensions.cpp
index e69de29bb2d1..2fe537f91876 100644
--- a/llvm/lib/Extensions/Extensions.cpp
+++ b/llvm/lib/Extensions/Extensions.cpp
@@ -0,0 +1,15 @@
+#include "llvm/Passes/PassPlugin.h"
+#define HANDLE_EXTENSION(Ext)                                                  \
+		llvm::PassPluginLibraryInfo get##Ext##PluginInfo();
+#include "llvm/Support/Extension.def"
+
+
+namespace llvm {
+	namespace details {
+		void extensions_anchor() {
+#define HANDLE_EXTENSION(Ext)                                                  \
+			static auto Ext = get##Ext##PluginInfo();
+#include "llvm/Support/Extension.def"
+		}
+	}
+}


        


More information about the llvm-branch-commits mailing list