From 3c6b29b7e96f4fd0c9f5aae521d52cbf2b4493c2 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 29 Mar 2012 04:28:00 +0000 Subject: [PATCH] Cleanup whitespace. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153634 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/lto/LTOModule.h | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/tools/lto/LTOModule.h b/tools/lto/LTOModule.h index 157d3252a44..2c529482fce 100644 --- a/tools/lto/LTOModule.h +++ b/tools/lto/LTOModule.h @@ -4,10 +4,10 @@ // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // -// This file declares the LTOModule class. +// This file declares the LTOModule class. // //===----------------------------------------------------------------------===// @@ -41,11 +41,10 @@ namespace llvm { struct LTOModule { private: typedef llvm::StringMap StringSet; - - struct NameAndAttributes { - enum name_type { IsFunction, IsData }; - const char* name; - lto_symbol_attributes attributes; + + struct NameAndAttributes { + const char *name; + uint32_t attributes; }; llvm::OwningPtr _module; @@ -53,7 +52,7 @@ private: std::vector _symbols; // _defines and _undefines only needed to disambiguate tentative definitions - StringSet _defines; + StringSet _defines; llvm::StringMap _undefines; std::vector _asm_undefines; llvm::MCContext _context; @@ -70,10 +69,10 @@ public: /// isBitcodeFileForTarget - Returns 'true' if the file or memory contents /// is LLVM bitcode for the specified triple. - static bool isBitcodeFileForTarget(const void *mem, + static bool isBitcodeFileForTarget(const void *mem, size_t length, const char *triplePrefix); - static bool isBitcodeFileForTarget(const char *path, + static bool isBitcodeFileForTarget(const char *path, const char *triplePrefix); /// makeLTOModule - Create an LTOModule. N.B. These methods take ownership @@ -109,17 +108,15 @@ public: /// index. lto_symbol_attributes getSymbolAttributes(uint32_t index) { if (index < _symbols.size()) - return _symbols[index].attributes; - else - return lto_symbol_attributes(0); + return lto_symbol_attributes(_symbols[index].attributes); + return lto_symbol_attributes(0); } /// getSymbolName - Get the name of the symbol at the specified index. const char *getSymbolName(uint32_t index) { if (index < _symbols.size()) return _symbols[index].name; - else - return NULL; + return NULL; } /// getLLVVMModule - Return the Module. -- 2.34.1