Eliminate more special cases for opcodes.
[oota-llvm.git] / lib / CodeGen / ShadowStackGC.cpp
index 472bd374d94e2b3697f57f2bf3ddef7b6b8e242d..2402f81bb04f3216438a43d9aba11548625e2de2 100644 (file)
@@ -31,6 +31,7 @@
 #include "llvm/CodeGen/GCStrategy.h"
 #include "llvm/IntrinsicInst.h"
 #include "llvm/Module.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/IRBuilder.h"
 
 using namespace llvm;
@@ -292,12 +293,12 @@ bool ShadowStackGC::initializeCustomLowering(Module &M) {
     // If the root chain does not exist, insert a new one with linkonce
     // linkage!
     Head = new GlobalVariable(StackEntryPtrTy, false,
-                              GlobalValue::LinkOnceLinkage,
+                              GlobalValue::LinkOnceAnyLinkage,
                               Constant::getNullValue(StackEntryPtrTy),
                               "llvm_gc_root_chain", &M);
   } else if (Head->hasExternalLinkage() && Head->isDeclaration()) {
     Head->setInitializer(Constant::getNullValue(StackEntryPtrTy));
-    Head->setLinkage(GlobalValue::LinkOnceLinkage);
+    Head->setLinkage(GlobalValue::LinkOnceAnyLinkage);
   }
 
   return true;