reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
911 LLVM_DEBUG(dbgs() << "Converting to a declaration: `" << GV.getName() 913 if (Function *F = dyn_cast<Function>(&GV)) { 917 } else if (GlobalVariable *V = dyn_cast<GlobalVariable>(&GV)) { 924 if (GV.getValueType()->isFunctionTy()) 926 Function::Create(cast<FunctionType>(GV.getValueType()), 927 GlobalValue::ExternalLinkage, GV.getAddressSpace(), 928 "", GV.getParent()); 931 new GlobalVariable(*GV.getParent(), GV.getValueType(), 931 new GlobalVariable(*GV.getParent(), GV.getValueType(), 934 /*insertbefore*/ nullptr, GV.getThreadLocalMode(), 935 GV.getType()->getAddressSpace()); 936 NewGV->takeName(&GV); 937 GV.replaceAllUsesWith(NewGV);