Fix crazy indentation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22380 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2005-07-11 06:25:47 +00:00
parent a698871367
commit b12c9fa565

View File

@@ -48,15 +48,15 @@ bool X86SharedAsmPrinter::doInitialization(Module& M) {
TT.find("mingw") != std::string::npos; TT.find("mingw") != std::string::npos;
forDarwin = TT.find("darwin") != std::string::npos; forDarwin = TT.find("darwin") != std::string::npos;
} else if (TT.empty()) { } else if (TT.empty()) {
#if defined(__CYGWIN__) || defined(__MINGW32__) #if defined(__CYGWIN__) || defined(__MINGW32__)
forCygwin = true; forCygwin = true;
#elif defined(__APPLE__) #elif defined(__APPLE__)
forDarwin = true; forDarwin = true;
#elif defined(_WIN32) #elif defined(_WIN32)
leadingUnderscore = true; leadingUnderscore = true;
#else #else
leadingUnderscore = false; leadingUnderscore = false;
#endif #endif
} }
if (leadingUnderscore || forCygwin || forDarwin) if (leadingUnderscore || forCygwin || forDarwin)
GlobalPrefix = "_"; GlobalPrefix = "_";
@@ -95,7 +95,8 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
std::string CurSection; std::string CurSection;
// Print out module-level global variables here. // Print out module-level global variables here.
for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I) for (Module::const_global_iterator I = M.global_begin(),
E = M.global_end(); I != E; ++I)
if (I->hasInitializer()) { // External global require no code if (I->hasInitializer()) { // External global require no code
O << "\n\n"; O << "\n\n";
std::string name = Mang->getValueName(I); std::string name = Mang->getValueName(I);
@@ -120,6 +121,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
O << "\n"; O << "\n";
} else { } else {
switch (I->getLinkage()) { switch (I->getLinkage()) {
default: assert(0 && "Unknown linkage type!");
case GlobalValue::LinkOnceLinkage: case GlobalValue::LinkOnceLinkage:
case GlobalValue::WeakLinkage: // FIXME: Verify correct for weak. case GlobalValue::WeakLinkage: // FIXME: Verify correct for weak.
// Nonnull linkonce -> weak // Nonnull linkonce -> weak
@@ -140,9 +142,6 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
else else
SwitchSection(O, CurSection, ".data"); SwitchSection(O, CurSection, ".data");
break; break;
case GlobalValue::GhostLinkage:
std::cerr << "GhostLinkage cannot appear in X86AsmPrinter!\n";
abort();
} }
emitAlignment(Align); emitAlignment(Align);
@@ -163,8 +162,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
// Output stubs for dynamically-linked functions // Output stubs for dynamically-linked functions
unsigned j = 1; unsigned j = 1;
for (std::set<std::string>::iterator i = FnStubs.begin(), e = FnStubs.end(); for (std::set<std::string>::iterator i = FnStubs.begin(), e = FnStubs.end();
i != e; ++i, ++j) i != e; ++i, ++j) {
{
O << "\t.symbol_stub\n"; O << "\t.symbol_stub\n";
O << "L" << *i << "$stub:\n"; O << "L" << *i << "$stub:\n";
O << "\t.indirect_symbol " << *i << "\n"; O << "\t.indirect_symbol " << *i << "\n";