pretty mechanical changes to match coding guidelines (blessed by sabre on IRC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82603 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gabor Greif 2009-09-23 02:46:12 +00:00
parent c72efbeb42
commit 4136e7b90e

View File

@ -37,8 +37,8 @@ using namespace llvm;
bool LTOModule::isBitcodeFile(const void* mem, size_t length)
{
return ( llvm::sys::IdentifyFileType((char*)mem, length)
== llvm::sys::Bitcode_FileType );
return llvm::sys::IdentifyFileType((char*)mem, length)
== llvm::sys::Bitcode_FileType;
}
bool LTOModule::isBitcodeFile(const char* path)
@ -50,7 +50,7 @@ bool LTOModule::isBitcodeFileForTarget(const void* mem, size_t length,
const char* triplePrefix)
{
MemoryBuffer* buffer = makeBuffer(mem, length);
if ( buffer == NULL )
if (!buffer)
return false;
return isTargetMatch(buffer, triplePrefix);
}
@ -157,7 +157,7 @@ LTOModule* LTOModule::makeLTOModule(MemoryBuffer* buffer,
// find machine architecture for this module
const Target* march = TargetRegistry::lookupTarget(Triple, errMsg);
if ( march == NULL )
if (!march)
return NULL;
// construct LTModule, hand over ownership of module and target
@ -350,7 +350,7 @@ void LTOModule::addDefinedSymbol(GlobalValue* def, Mangler &mangler,
attr |= LTO_SYMBOL_PERMISSIONS_CODE;
else {
GlobalVariable* gv = dyn_cast<GlobalVariable>(def);
if ( (gv != NULL) && gv->isConstant() )
if (gv && gv->isConstant())
attr |= LTO_SYMBOL_PERMISSIONS_RODATA;
else
attr |= LTO_SYMBOL_PERMISSIONS_DATA;
@ -446,7 +446,7 @@ void LTOModule::findExternalRefs(Value* value, Mangler &mangler) {
// GlobalValue, even with InternalLinkage type, may have operands with
// ExternalLinkage type. Do not ignore these operands.
if (Constant* c = dyn_cast<Constant>(value)) {
// Handle ConstantExpr, ConstantStruct, ConstantArry etc..
// Handle ConstantExpr, ConstantStruct, ConstantArry etc.
for (unsigned i = 0, e = c->getNumOperands(); i != e; ++i)
findExternalRefs(c->getOperand(i), mangler);
}