mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-02 00:37:09 +00:00
Cleanup some whitespaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153612 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
892143ff70
commit
3bb17380b1
@ -158,7 +158,7 @@ LTOModule *LTOModule::makeLTOModule(MemoryBuffer *buffer,
|
||||
TargetMachine *target = march->createTargetMachine(Triple, CPU, FeatureStr,
|
||||
Options);
|
||||
LTOModule *Ret = new LTOModule(m.take(), target);
|
||||
if (Ret->ParseSymbols(errMsg)) {
|
||||
if (Ret->parseSymbols(errMsg)) {
|
||||
delete Ret;
|
||||
return NULL;
|
||||
}
|
||||
@ -662,9 +662,9 @@ static bool isDeclaration(const GlobalValue &V) {
|
||||
return V.isDeclaration();
|
||||
}
|
||||
|
||||
/// ParseSymbols - Parse the symbols from the module and model-level ASM and add
|
||||
/// parseSymbols - Parse the symbols from the module and model-level ASM and add
|
||||
/// them to either the defined or undefined lists.
|
||||
bool LTOModule::ParseSymbols(std::string &errMsg) {
|
||||
bool LTOModule::parseSymbols(std::string &errMsg) {
|
||||
// add functions
|
||||
for (Module::iterator f = _module->begin(); f != _module->end(); ++f) {
|
||||
if (isDeclaration(*f))
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <string>
|
||||
|
||||
|
||||
// forward references to llvm classes
|
||||
// Forward references to llvm classes.
|
||||
namespace llvm {
|
||||
class Function;
|
||||
class GlobalValue;
|
||||
@ -36,7 +36,7 @@ namespace llvm {
|
||||
}
|
||||
|
||||
//
|
||||
// C++ class which implements the opaque lto_module_t
|
||||
// C++ class which implements the opaque lto_module_t type.
|
||||
//
|
||||
struct LTOModule {
|
||||
private:
|
||||
@ -78,21 +78,20 @@ public:
|
||||
|
||||
/// makeLTOModule - Create an LTOModule. N.B. These methods take ownership
|
||||
/// of the buffer.
|
||||
static LTOModule* makeLTOModule(const char* path,
|
||||
static LTOModule *makeLTOModule(const char* path,
|
||||
std::string &errMsg);
|
||||
static LTOModule* makeLTOModule(int fd, const char *path,
|
||||
size_t size,
|
||||
std::string &errMsg);
|
||||
static LTOModule* makeLTOModule(int fd, const char *path,
|
||||
static LTOModule *makeLTOModule(int fd, const char *path,
|
||||
size_t size, std::string &errMsg);
|
||||
static LTOModule *makeLTOModule(int fd, const char *path,
|
||||
size_t file_size,
|
||||
size_t map_size,
|
||||
off_t offset,
|
||||
std::string& errMsg);
|
||||
static LTOModule* makeLTOModule(const void *mem, size_t length,
|
||||
static LTOModule *makeLTOModule(const void *mem, size_t length,
|
||||
std::string &errMsg);
|
||||
|
||||
/// getTargetTriple - Return the Module's target triple.
|
||||
const char* getTargetTriple() {
|
||||
const char *getTargetTriple() {
|
||||
return _module->getTargetTriple().c_str();
|
||||
}
|
||||
|
||||
@ -116,7 +115,7 @@ public:
|
||||
}
|
||||
|
||||
/// getSymbolName - Get the name of the symbol at the specified index.
|
||||
const char* getSymbolName(uint32_t index) {
|
||||
const char *getSymbolName(uint32_t index) {
|
||||
if (index < _symbols.size())
|
||||
return _symbols[index].name;
|
||||
else
|
||||
@ -124,7 +123,7 @@ public:
|
||||
}
|
||||
|
||||
/// getLLVVMModule - Return the Module.
|
||||
llvm::Module * getLLVVMModule() { return _module.get(); }
|
||||
llvm::Module *getLLVVMModule() { return _module.get(); }
|
||||
|
||||
/// getAsmUndefinedRefs -
|
||||
const std::vector<const char*> &getAsmUndefinedRefs() {
|
||||
@ -132,17 +131,16 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
/// ParseSymbols - Parse the symbols from the module and model-level ASM and
|
||||
/// parseSymbols - Parse the symbols from the module and model-level ASM and
|
||||
/// add them to either the defined or undefined lists.
|
||||
bool ParseSymbols(std::string &errMsg);
|
||||
bool parseSymbols(std::string &errMsg);
|
||||
|
||||
/// addPotentialUndefinedSymbol - Add a symbol which isn't defined just yet
|
||||
/// to a list to be resolved later.
|
||||
void addPotentialUndefinedSymbol(llvm::GlobalValue *dcl);
|
||||
|
||||
/// addDefinedSymbol - Add a defined symbol to the list.
|
||||
void addDefinedSymbol(llvm::GlobalValue *def,
|
||||
bool isFunction);
|
||||
void addDefinedSymbol(llvm::GlobalValue *def, bool isFunction);
|
||||
|
||||
/// addDefinedFunctionSymbol - Add a function symbol as defined to the list.
|
||||
void addDefinedFunctionSymbol(llvm::Function *f);
|
||||
@ -156,8 +154,7 @@ private:
|
||||
|
||||
/// addAsmGlobalSymbol - Add a global symbol from module-level ASM to the
|
||||
/// defined list.
|
||||
void addAsmGlobalSymbol(const char *,
|
||||
lto_symbol_attributes scope);
|
||||
void addAsmGlobalSymbol(const char *, lto_symbol_attributes scope);
|
||||
|
||||
/// addAsmGlobalSymbolUndef - Add a global symbol from module-level ASM to
|
||||
/// the undefined list.
|
||||
@ -174,8 +171,7 @@ private:
|
||||
|
||||
/// objcClassNameFromExpression - Get string that the data pointer points
|
||||
/// to.
|
||||
bool objcClassNameFromExpression(llvm::Constant* c,
|
||||
std::string &name);
|
||||
bool objcClassNameFromExpression(llvm::Constant* c, std::string &name);
|
||||
|
||||
/// isTargetMatch - Returns 'true' if the memory buffer is for the specified
|
||||
/// target triple.
|
||||
@ -184,7 +180,7 @@ private:
|
||||
|
||||
/// makeLTOModule - Create an LTOModule (private version). N.B. This
|
||||
/// method takes ownership of the buffer.
|
||||
static LTOModule* makeLTOModule(llvm::MemoryBuffer *buffer,
|
||||
static LTOModule *makeLTOModule(llvm::MemoryBuffer *buffer,
|
||||
std::string &errMsg);
|
||||
|
||||
/// makeBuffer - Create a MemoryBuffer from a memory range.
|
||||
|
Loading…
Reference in New Issue
Block a user