Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.
llvm-svn: 75025
diff --git a/llvm/lib/Transforms/IPO/ExtractGV.cpp b/llvm/lib/Transforms/IPO/ExtractGV.cpp
index e26bd3a..b7c5ca3 100644
--- a/llvm/lib/Transforms/IPO/ExtractGV.cpp
+++ b/llvm/lib/Transforms/IPO/ExtractGV.cpp
@@ -108,9 +108,9 @@
}
ArrayType *AT = Context->getArrayType(SBP, AUGs.size());
Constant *Init = Context->getConstantArray(AT, AUGs);
- GlobalValue *gv = new GlobalVariable(M.getContext(), AT, false,
+ GlobalValue *gv = new GlobalVariable(M, AT, false,
GlobalValue::AppendingLinkage,
- Init, "llvm.used", &M);
+ Init, "llvm.used");
gv->setSection("llvm.metadata");
}