diff options
author | Devang Patel <dpatel@apple.com> | 2007-10-30 20:59:40 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-10-30 20:59:40 +0000 |
commit | ffe1e218f23a654b4228cb0e3cdd1f3780626e6a (patch) | |
tree | a7c10f8e90b80cd1a104afc7321e8614c8656d70 /clang/CodeGen/CodeGenModule.cpp | |
parent | 0b11172e8c3bd62c2d5963391d4bba2a51e2d3a0 (diff) | |
download | bcm5719-llvm-ffe1e218f23a654b4228cb0e3cdd1f3780626e6a.tar.gz bcm5719-llvm-ffe1e218f23a654b4228cb0e3cdd1f3780626e6a.zip |
Fix 80 col violations.
llvm-svn: 43516
Diffstat (limited to 'clang/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/CodeGen/CodeGenModule.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/clang/CodeGen/CodeGenModule.cpp b/clang/CodeGen/CodeGenModule.cpp index 00c262167c6..b5f4c8d1ff5 100644 --- a/clang/CodeGen/CodeGenModule.cpp +++ b/clang/CodeGen/CodeGenModule.cpp @@ -83,15 +83,18 @@ void CodeGenModule::EmitGlobalVar(const FileVarDecl *D) { std::vector<llvm::Constant*> ArrayElts; const llvm::PointerType *APType = cast<llvm::PointerType>(GV->getType()); - const llvm::ArrayType *AType = cast<llvm::ArrayType>(APType->getElementType()); + const llvm::ArrayType *AType = + cast<llvm::ArrayType>(APType->getElementType()); // Copy initializer elements. unsigned i = 0; for (i = 0; i < NumInitElements; ++i) { assert (ILE->getInit(i)->getType()->isIntegerType() && "Only IntegerType global array initializers are supported"); - llvm::APSInt Value(static_cast<uint32_t>( - getContext().getTypeSize(ILE->getInit(i)->getType(), SourceLocation()))); + llvm::APSInt + Value(static_cast<uint32_t> + (getContext().getTypeSize(ILE->getInit(i)->getType(), + SourceLocation()))); if (ILE->getInit(i)->isIntegerConstantExpr(Value, Context)) { llvm::Constant *C = llvm::ConstantInt::get(Value); ArrayElts.push_back(C); @@ -100,8 +103,9 @@ void CodeGenModule::EmitGlobalVar(const FileVarDecl *D) { // Initialize remaining array elements. unsigned NumArrayElements = AType->getNumElements(); + const llvm::Type *AElemTy = AType->getElementType(); for (; i < NumArrayElements; ++i) - ArrayElts.push_back(llvm::Constant::getNullValue(AType->getElementType())); + ArrayElts.push_back(llvm::Constant::getNullValue(AElemTy)); Init = llvm::ConstantArray::get(AType, ArrayElts); } else |