From ee0e9ccb52d04d23c8ae761ba7fa7ab0d4cd6210 Mon Sep 17 00:00:00 2001 From: Maksim Panchenko Date: Thu, 23 Dec 2021 12:38:33 -0800 Subject: [BOLTRewrite][NFC] Fix braces usages Summary: Refactor bolt/*/Rewrite to follow the braces rule for if/else/loop from LLVM Coding Standards. (cherry picked from FBD33305364) --- bolt/lib/Rewrite/ExecutableFileMemoryManager.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'bolt/lib/Rewrite/ExecutableFileMemoryManager.cpp') diff --git a/bolt/lib/Rewrite/ExecutableFileMemoryManager.cpp b/bolt/lib/Rewrite/ExecutableFileMemoryManager.cpp index c8f7aa0..b186e80 100644 --- a/bolt/lib/Rewrite/ExecutableFileMemoryManager.cpp +++ b/bolt/lib/Rewrite/ExecutableFileMemoryManager.cpp @@ -37,19 +37,17 @@ uint8_t *ExecutableFileMemoryManager::allocateSection(intptr_t Size, } if (!IsCode && (SectionName == ".strtab" || SectionName == ".symtab" || - SectionName == "" || SectionName.startswith(".rela."))) { + SectionName == "" || SectionName.startswith(".rela."))) return SectionMemoryManager::allocateDataSection(Size, Alignment, SectionID, SectionName, IsReadOnly); - } uint8_t *Ret; - if (IsCode) { + if (IsCode) Ret = SectionMemoryManager::allocateCodeSection(Size, Alignment, SectionID, SectionName); - } else { + else Ret = SectionMemoryManager::allocateDataSection(Size, Alignment, SectionID, SectionName, IsReadOnly); - } SmallVector Buf; if (ObjectsLoaded > 0) { -- cgit v1.1