mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-16 11:24:39 +00:00
Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75025 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1290,9 +1290,8 @@ struct VISIBILITY_HIDDEN PrintFOpt : public LibCallOptimization {
|
||||
// pass to be run after this pass, to merge duplicate strings.
|
||||
FormatStr.erase(FormatStr.end()-1);
|
||||
Constant *C = Context->getConstantArray(FormatStr, true);
|
||||
C = new GlobalVariable(*Context, C->getType(),
|
||||
true, GlobalVariable::InternalLinkage,
|
||||
C, "str", Callee->getParent());
|
||||
C = new GlobalVariable(*Callee->getParent(), C->getType(), true,
|
||||
GlobalVariable::InternalLinkage, C, "str");
|
||||
EmitPutS(C, B);
|
||||
return CI->use_empty() ? (Value*)CI :
|
||||
Context->getConstantInt(CI->getType(), FormatStr.size()+1);
|
||||
|
Reference in New Issue
Block a user