Skip to content

Commit 370ec93

Browse files
committed
CodeGen: rename variables to adhere to naming convention
Adjust style before making more intrusive changes. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294854 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent dd62178 commit 370ec93

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

lib/CodeGen/CGObjC.cpp

+10-9
Original file line numberDiff line numberDiff line change
@@ -1803,25 +1803,25 @@ void CodeGenFunction::EmitARCIntrinsicUse(ArrayRef<llvm::Value*> values) {
18031803

18041804

18051805
static llvm::Constant *createARCRuntimeFunction(CodeGenModule &CGM,
1806-
llvm::FunctionType *type,
1807-
StringRef fnName) {
1808-
llvm::Constant *fn = CGM.CreateRuntimeFunction(type, fnName);
1806+
llvm::FunctionType *FTy,
1807+
StringRef Name) {
1808+
llvm::Constant *RTF = CGM.CreateRuntimeFunction(FTy, Name);
18091809

1810-
if (llvm::Function *f = dyn_cast<llvm::Function>(fn)) {
1810+
if (auto *F = dyn_cast<llvm::Function>(RTF)) {
18111811
// If the target runtime doesn't naturally support ARC, emit weak
18121812
// references to the runtime support library. We don't really
18131813
// permit this to fail, but we need a particular relocation style.
18141814
if (!CGM.getLangOpts().ObjCRuntime.hasNativeARC() &&
18151815
!CGM.getTriple().isOSBinFormatCOFF()) {
1816-
f->setLinkage(llvm::Function::ExternalWeakLinkage);
1817-
} else if (fnName == "objc_retain" || fnName == "objc_release") {
1816+
F->setLinkage(llvm::Function::ExternalWeakLinkage);
1817+
} else if (Name == "objc_retain" || Name == "objc_release") {
18181818
// If we have Native ARC, set nonlazybind attribute for these APIs for
18191819
// performance.
1820-
f->addFnAttr(llvm::Attribute::NonLazyBind);
1820+
F->addFnAttr(llvm::Attribute::NonLazyBind);
18211821
}
18221822
}
18231823

1824-
return fn;
1824+
return RTF;
18251825
}
18261826

18271827
/// Perform an operation having the signature
@@ -1832,7 +1832,8 @@ static llvm::Value *emitARCValueOperation(CodeGenFunction &CGF,
18321832
llvm::Constant *&fn,
18331833
StringRef fnName,
18341834
bool isTailCall = false) {
1835-
if (isa<llvm::ConstantPointerNull>(value)) return value;
1835+
if (isa<llvm::ConstantPointerNull>(value))
1836+
return value;
18361837

18371838
if (!fn) {
18381839
llvm::FunctionType *fnType =

0 commit comments

Comments
 (0)