summaryrefslogtreecommitdiff
path: root/contrib/llvm/lib/Object/COFFImportFile.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-06-10 19:17:14 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-06-10 19:17:14 +0000
commitdb17bf38c59bc172953ed66cfe1b10c03c6bc383 (patch)
tree2712281fec99b99c2fcafd5b46439dfdd93261aa /contrib/llvm/lib/Object/COFFImportFile.cpp
parent686fb94a00297bf9ff49d93b948925552a2ce8e0 (diff)
parent7ab83427af0f77b59941ceba41d509d7d097b065 (diff)
Notes
Diffstat (limited to 'contrib/llvm/lib/Object/COFFImportFile.cpp')
-rw-r--r--contrib/llvm/lib/Object/COFFImportFile.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/llvm/lib/Object/COFFImportFile.cpp b/contrib/llvm/lib/Object/COFFImportFile.cpp
index 37962d84d855..740bf94d40e0 100644
--- a/contrib/llvm/lib/Object/COFFImportFile.cpp
+++ b/contrib/llvm/lib/Object/COFFImportFile.cpp
@@ -285,11 +285,13 @@ ObjectFactory::createImportDescriptor(std::vector<uint8_t> &Buffer) {
IMAGE_SYM_CLASS_EXTERNAL,
0},
};
- reinterpret_cast<StringTableOffset &>(SymbolTable[0].Name).Offset =
+ // TODO: Name.Offset.Offset here and in the all similar places below
+ // suggests a names refactoring. Maybe StringTableOffset.Value?
+ SymbolTable[0].Name.Offset.Offset =
sizeof(uint32_t);
- reinterpret_cast<StringTableOffset &>(SymbolTable[5].Name).Offset =
+ SymbolTable[5].Name.Offset.Offset =
sizeof(uint32_t) + ImportDescriptorSymbolName.length() + 1;
- reinterpret_cast<StringTableOffset &>(SymbolTable[6].Name).Offset =
+ SymbolTable[6].Name.Offset.Offset =
sizeof(uint32_t) + ImportDescriptorSymbolName.length() + 1 +
NullImportDescriptorSymbolName.length() + 1;
append(Buffer, SymbolTable);
@@ -354,8 +356,7 @@ ObjectFactory::createNullImportDescriptor(std::vector<uint8_t> &Buffer) {
IMAGE_SYM_CLASS_EXTERNAL,
0},
};
- reinterpret_cast<StringTableOffset &>(SymbolTable[0].Name).Offset =
- sizeof(uint32_t);
+ SymbolTable[0].Name.Offset.Offset = sizeof(uint32_t);
append(Buffer, SymbolTable);
// String Table
@@ -437,8 +438,7 @@ NewArchiveMember ObjectFactory::createNullThunk(std::vector<uint8_t> &Buffer) {
IMAGE_SYM_CLASS_EXTERNAL,
0},
};
- reinterpret_cast<StringTableOffset &>(SymbolTable[0].Name).Offset =
- sizeof(uint32_t);
+ SymbolTable[0].Name.Offset.Offset = sizeof(uint32_t);
append(Buffer, SymbolTable);
// String Table