aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/MachOObjectFile.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2023-11-29 12:40:05 -0800
committerAdrian Prantl <aprantl@apple.com>2023-11-29 12:40:37 -0800
commit69b0cb9c567eb0f937474f5424b9ed23b61c04d7 (patch)
tree32a822de5a883aa65993ce3266d0648800881a6a /llvm/lib/Object/MachOObjectFile.cpp
parentfc05a82fa6f91c6872a0fad80177d63b578df14f (diff)
downloadllvm-69b0cb9c567eb0f937474f5424b9ed23b61c04d7.zip
llvm-69b0cb9c567eb0f937474f5424b9ed23b61c04d7.tar.gz
llvm-69b0cb9c567eb0f937474f5424b9ed23b61c04d7.tar.bz2
Revert "[LEB128] Don't initialize error on success"
This reverts commit 545c8e009e2b649ef38f7e432ffbc06ba8a9b813.
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
-rw-r--r--llvm/lib/Object/MachOObjectFile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp
index 5e6c6ea..aa57de1 100644
--- a/llvm/lib/Object/MachOObjectFile.cpp
+++ b/llvm/lib/Object/MachOObjectFile.cpp
@@ -2996,7 +2996,7 @@ void ExportEntry::pushNode(uint64_t offset) {
ErrorAsOutParameter ErrAsOutParam(E);
const uint8_t *Ptr = Trie.begin() + offset;
NodeState State(Ptr);
- const char *error = nullptr;
+ const char *error;
uint64_t ExportInfoSize = readULEB128(State.Current, &error);
if (error) {
*E = malformedError("export info size " + Twine(error) +
@@ -3131,7 +3131,7 @@ void ExportEntry::pushNode(uint64_t offset) {
void ExportEntry::pushDownUntilBottom() {
ErrorAsOutParameter ErrAsOutParam(E);
- const char *error = nullptr;
+ const char *error;
while (Stack.back().NextChildIndex < Stack.back().ChildCount) {
NodeState &Top = Stack.back();
CumulativeString.resize(Top.ParentStringLength);