summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerge Guelton <sguelton@redhat.com>2020-06-25 05:57:01 -0400
committerTom Stellard <tstellar@redhat.com>2020-06-25 16:14:38 -0700
commit04b0a4e22e3b4549f9d241f8a9f37eebecb62a31 (patch)
treecab06feaf14649ae516d3aad0a1adea9ab2cb006
parent43ca67c05d2881d00075a15de555af1b19370294 (diff)
Provide anchor for compiler extensions
-rw-r--r--llvm/lib/Extensions/Extensions.cpp15
1 files changed, 15 insertions, 0 deletions
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"
+ }
+ }
+}