aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/CppBackend/CPPBackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/CppBackend/CPPBackend.cpp')
-rw-r--r--lib/Target/CppBackend/CPPBackend.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp
index 8ddf91e968..9f2422ee85 100644
--- a/lib/Target/CppBackend/CPPBackend.cpp
+++ b/lib/Target/CppBackend/CPPBackend.cpp
@@ -2306,7 +2306,7 @@ void CppWriter::allocateConstant(std::string name, const Constant* CV) {
unsigned Bytes = DL.getTypeStoreSize(CV->getType());
// FIXME: assume full 64-bit alignment for now
Bytes = memAlign(Bytes);
- GlobalAddresses[name] = Address(Bytes, MEM_ALIGN_BITS);
+ GlobalAddresses[name] = Address(GlobalData64.size(), MEM_ALIGN_BITS);
for (unsigned i = 0; i < Bytes; ++i) {
GlobalData64.push_back(0);
}