diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-04-04 00:55:25 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-04-04 00:55:25 +0000 |
commit | 74a1a1f0b6f6c4468444196a02c033be521f7d79 (patch) | |
tree | 9912a2e68dc788febbddb6e56d1d5252f033b1e9 /lib/CodeGen | |
parent | 6c656c3d89523d8ddd143f96e11f6bc16c10c60b (diff) |
Silence dead store warning, and fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153986 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CGObjCGNU.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp index 6f3e5dc574..54c4e655c2 100644 --- a/lib/CodeGen/CGObjCGNU.cpp +++ b/lib/CodeGen/CGObjCGNU.cpp @@ -2121,15 +2121,16 @@ void CGObjCGNU::GenerateClass(const ObjCImplementationDecl *OID) { // Get the existing variable, if one exists. llvm::GlobalVariable *offset = TheModule.getNamedGlobal(Name); if (offset) { - offset->setInitializer(offsetValue); - // If this is the real definition, change its linkage type so that - // different modules will use this one, rather than their private - // copy. - offset->setLinkage(llvm::GlobalValue::ExternalLinkage); + offset->setInitializer(offsetValue); + // If this is the real definition, change its linkage type so that + // different modules will use this one, rather than their private + // copy. + offset->setLinkage(llvm::GlobalValue::ExternalLinkage); } else { - // Add a new alias if there isn't one already. - offset = new llvm::GlobalVariable(TheModule, offsetValue->getType(), - false, llvm::GlobalValue::ExternalLinkage, offsetValue, Name); + // Add a new alias if there isn't one already. + offset = new llvm::GlobalVariable(TheModule, offsetValue->getType(), + false, llvm::GlobalValue::ExternalLinkage, offsetValue, Name); + (void) offset; // Silence dead store warning. } ++ivarIndex; } |