mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
Reduce indentation by early exiting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161356 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -211,7 +211,8 @@ const void* LTOCodeGenerator::compile(size_t* length, std::string& errMsg) {
|
||||
}
|
||||
|
||||
bool LTOCodeGenerator::determineTarget(std::string& errMsg) {
|
||||
if ( _target == NULL ) {
|
||||
if ( _target != NULL ) return false;
|
||||
|
||||
std::string Triple = _linker.getModule()->getTargetTriple();
|
||||
if (Triple.empty())
|
||||
Triple = sys::getDefaultTargetTriple();
|
||||
@@ -245,7 +246,6 @@ bool LTOCodeGenerator::determineTarget(std::string& errMsg) {
|
||||
_target = march->createTargetMachine(Triple, _mCpu, FeatureStr, Options,
|
||||
RelocModel, CodeModel::Default,
|
||||
CodeGenOpt::Aggressive);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -409,6 +409,9 @@ void LTOModule::addDefinedDataSymbol(GlobalValue *v) {
|
||||
// Add to list of defined symbols.
|
||||
addDefinedSymbol(v, false);
|
||||
|
||||
if (!v->hasSection() /* || !isTargetDarwin */)
|
||||
return;
|
||||
|
||||
// Special case i386/ppc ObjC data structures in magic sections:
|
||||
// The issue is that the old ObjC object format did some strange
|
||||
// contortions to avoid real linker symbols. For instance, the
|
||||
@@ -428,7 +431,7 @@ void LTOModule::addDefinedDataSymbol(GlobalValue *v) {
|
||||
// a class was missing.
|
||||
// The following synthesizes the implicit .objc_* symbols for the linker
|
||||
// from the ObjC data structures generated by the front end.
|
||||
if (v->hasSection() /* && isTargetDarwin */) {
|
||||
|
||||
// special case if this data blob is an ObjC class definition
|
||||
if (v->getSection().compare(0, 15, "__OBJC,__class,") == 0) {
|
||||
if (GlobalVariable *gv = dyn_cast<GlobalVariable>(v)) {
|
||||
@@ -450,7 +453,6 @@ void LTOModule::addDefinedDataSymbol(GlobalValue *v) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// addDefinedFunctionSymbol - Add a function symbol as defined to the list.
|
||||
void LTOModule::addDefinedFunctionSymbol(Function *f) {
|
||||
|
Reference in New Issue
Block a user