summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2010-04-16 20:56:35 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2010-04-16 20:56:35 +0000
commit5863c999e7a0488cca94786bf62e7b4c69fd82c2 (patch)
tree1e5fc592b3b052cca263d0afc1a40d19ccbb3e6b /clang/lib/CodeGen/CGExprConstant.cpp
parent4d273f451900f678ef17330969cb817523a23db0 (diff)
downloadbcm5719-llvm-5863c999e7a0488cca94786bf62e7b4c69fd82c2.tar.gz
bcm5719-llvm-5863c999e7a0488cca94786bf62e7b4c69fd82c2.zip
emit padding as undef values, take 2
merge also a few tests I had here for this feature, and FileCheck'ize one file llvm-svn: 101535
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprConstant.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp
index 7da7554e2cc..52e7d045e60 100644
--- a/clang/lib/CodeGen/CGExprConstant.cpp
+++ b/clang/lib/CodeGen/CGExprConstant.cpp
@@ -259,7 +259,7 @@ void ConstStructBuilder::AppendPadding(uint64_t NumBytes) {
if (NumBytes > 1)
Ty = llvm::ArrayType::get(Ty, NumBytes);
- llvm::Constant *C = llvm::Constant::getNullValue(Ty);
+ llvm::Constant *C = llvm::UndefValue::get(Ty);
Elements.push_back(C);
assert(getAlignment(C) == 1 && "Padding must have 1 byte alignment!");
@@ -297,7 +297,7 @@ void ConstStructBuilder::ConvertStructToPacked() {
if (NumBytes > 1)
Ty = llvm::ArrayType::get(Ty, NumBytes);
- llvm::Constant *Padding = llvm::Constant::getNullValue(Ty);
+ llvm::Constant *Padding = llvm::UndefValue::get(Ty);
PackedElements.push_back(Padding);
ElementOffsetInBytes += getSizeInBytes(Padding);
}
@@ -537,7 +537,7 @@ public:
if (NumPadBytes > 1)
Ty = llvm::ArrayType::get(Ty, NumPadBytes);
- Elts.push_back(llvm::Constant::getNullValue(Ty));
+ Elts.push_back(llvm::UndefValue::get(Ty));
Types.push_back(Ty);
}
OpenPOWER on IntegriCloud