diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-03-29 04:28:00 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-03-29 04:28:00 +0000 |
commit | 3c6b29b7e96f4fd0c9f5aae521d52cbf2b4493c2 (patch) | |
tree | 5afcf966c3beb05861873f00914c4f513ad6bab1 /tools | |
parent | 9f3b483b814efb536d1ad391e664443333d14179 (diff) | |
download | external_llvm-3c6b29b7e96f4fd0c9f5aae521d52cbf2b4493c2.zip external_llvm-3c6b29b7e96f4fd0c9f5aae521d52cbf2b4493c2.tar.gz external_llvm-3c6b29b7e96f4fd0c9f5aae521d52cbf2b4493c2.tar.bz2 |
Cleanup whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153634 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lto/LTOModule.h | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/tools/lto/LTOModule.h b/tools/lto/LTOModule.h index 157d325..2c52948 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<uint8_t> 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<llvm::Module> _module; @@ -53,7 +52,7 @@ private: std::vector<NameAndAttributes> _symbols; // _defines and _undefines only needed to disambiguate tentative definitions - StringSet _defines; + StringSet _defines; llvm::StringMap<NameAndAttributes> _undefines; std::vector<const char*> _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. |