aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <djg@cray.com>2007-07-25 19:33:14 +0000
committerDan Gohman <djg@cray.com>2007-07-25 19:33:14 +0000
commit4a558a338dad938df33a3286eac0c64017fbcc38 (patch)
tree7b8801b5f072afa994cfed1e3b3f67c642774457 /lib
parent7c2e99c7dce12a5256f3611d5f12aad91db3d571 (diff)
downloadexternal_llvm-4a558a338dad938df33a3286eac0c64017fbcc38.zip
external_llvm-4a558a338dad938df33a3286eac0c64017fbcc38.tar.gz
external_llvm-4a558a338dad938df33a3286eac0c64017fbcc38.tar.bz2
Don't ignore the return value of AsmPrinter::doInitialization and
AsmPrinter::doFinalization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/ARM/ARMAsmPrinter.cpp7
-rw-r--r--lib/Target/Alpha/AlphaAsmPrinter.cpp6
-rw-r--r--lib/Target/IA64/IA64AsmPrinter.cpp7
-rw-r--r--lib/Target/Mips/MipsAsmPrinter.cpp3
-rw-r--r--lib/Target/PowerPC/PPCAsmPrinter.cpp14
-rw-r--r--lib/Target/Sparc/SparcAsmPrinter.cpp3
-rw-r--r--lib/Target/X86/X86AsmPrinter.cpp7
-rw-r--r--lib/Target/X86/X86IntelAsmPrinter.cpp8
8 files changed, 23 insertions, 32 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp
index 5e65226..f637dec 100644
--- a/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -789,13 +789,13 @@ bool ARMAsmPrinter::doInitialization(Module &M) {
// Emit initial debug information.
DW.BeginModule(&M);
- AsmPrinter::doInitialization(M);
+ bool Result = AsmPrinter::doInitialization(M);
// Darwin wants symbols to be quoted if they have complex names.
if (Subtarget->isTargetDarwin())
Mang->setUseQuotes(true);
- return false;
+ return Result;
}
bool ARMAsmPrinter::doFinalization(Module &M) {
@@ -1024,6 +1024,5 @@ bool ARMAsmPrinter::doFinalization(Module &M) {
DW.EndModule();
}
- AsmPrinter::doFinalization(M);
- return false; // success
+ return AsmPrinter::doFinalization(M);
}
diff --git a/lib/Target/Alpha/AlphaAsmPrinter.cpp b/lib/Target/Alpha/AlphaAsmPrinter.cpp
index 0494777..412f282 100644
--- a/lib/Target/Alpha/AlphaAsmPrinter.cpp
+++ b/lib/Target/Alpha/AlphaAsmPrinter.cpp
@@ -198,8 +198,7 @@ bool AlphaAsmPrinter::doInitialization(Module &M)
else
O << "\t.arch ev6\n";
O << "\t.set noat\n";
- AsmPrinter::doInitialization(M);
- return false;
+ return AsmPrinter::doInitialization(M);
}
bool AlphaAsmPrinter::doFinalization(Module &M) {
@@ -271,8 +270,7 @@ bool AlphaAsmPrinter::doFinalization(Module &M) {
O << '\n';
}
- AsmPrinter::doFinalization(M);
- return false;
+ return AsmPrinter::doFinalization(M);
}
/// PrintAsmOperand - Print out an operand for an inline asm expression.
diff --git a/lib/Target/IA64/IA64AsmPrinter.cpp b/lib/Target/IA64/IA64AsmPrinter.cpp
index d576c4c..cb2cf62 100644
--- a/lib/Target/IA64/IA64AsmPrinter.cpp
+++ b/lib/Target/IA64/IA64AsmPrinter.cpp
@@ -248,13 +248,13 @@ void IA64AsmPrinter::printMachineInstruction(const MachineInstr *MI) {
}
bool IA64AsmPrinter::doInitialization(Module &M) {
- AsmPrinter::doInitialization(M);
+ bool Result = AsmPrinter::doInitialization(M);
O << "\n.ident \"LLVM-ia64\"\n\n"
<< "\t.psr lsb\n" // should be "msb" on HP-UX, for starters
<< "\t.radix C\n"
<< "\t.psr abi64\n"; // we only support 64 bits for now
- return false;
+ return Result;
}
bool IA64AsmPrinter::doFinalization(Module &M) {
@@ -344,8 +344,7 @@ bool IA64AsmPrinter::doFinalization(Module &M) {
}
O << "\n\n";
- AsmPrinter::doFinalization(M);
- return false; // success
+ return AsmPrinter::doFinalization(M);
}
/// createIA64CodePrinterPass - Returns a pass that prints the IA64
diff --git a/lib/Target/Mips/MipsAsmPrinter.cpp b/lib/Target/Mips/MipsAsmPrinter.cpp
index 1df1291..563386b 100644
--- a/lib/Target/Mips/MipsAsmPrinter.cpp
+++ b/lib/Target/Mips/MipsAsmPrinter.cpp
@@ -428,6 +428,5 @@ doFinalization(Module &M)
}
}
- AsmPrinter::doFinalization(M);
- return false; // success
+ return AsmPrinter::doFinalization(M);
}
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp
index 31e9fcd..102249c 100644
--- a/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -626,7 +626,7 @@ bool LinuxAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
}
bool LinuxAsmPrinter::doInitialization(Module &M) {
- AsmPrinter::doInitialization(M);
+ bool Result = AsmPrinter::doInitialization(M);
// GNU as handles section names wrapped in quotes
Mang->setUseQuotes(true);
@@ -635,7 +635,7 @@ bool LinuxAsmPrinter::doInitialization(Module &M) {
// Emit initial debug information.
DW.BeginModule(&M);
- return false;
+ return Result;
}
bool LinuxAsmPrinter::doFinalization(Module &M) {
@@ -743,8 +743,7 @@ bool LinuxAsmPrinter::doFinalization(Module &M) {
// Emit initial debug information.
DW.EndModule();
- AsmPrinter::doFinalization(M);
- return false; // success
+ return AsmPrinter::doFinalization(M);
}
std::string LinuxAsmPrinter::getSectionForFunction(const Function &F) const {
@@ -858,7 +857,7 @@ bool DarwinAsmPrinter::doInitialization(Module &M) {
assert(Directive <= PPC::DIR_64 && "Directive out of range.");
O << "\t.machine " << CPUDirectives[Directive] << "\n";
- AsmPrinter::doInitialization(M);
+ bool Result = AsmPrinter::doInitialization(M);
// Darwin wants symbols to be quoted if they have complex names.
Mang->setUseQuotes(true);
@@ -878,7 +877,7 @@ bool DarwinAsmPrinter::doInitialization(Module &M) {
// Emit initial debug information.
DW.BeginModule(&M);
- return false;
+ return Result;
}
bool DarwinAsmPrinter::doFinalization(Module &M) {
@@ -1078,8 +1077,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
// code that does this, it is always safe to set.
O << "\t.subsections_via_symbols\n";
- AsmPrinter::doFinalization(M);
- return false; // success
+ return AsmPrinter::doFinalization(M);
}
diff --git a/lib/Target/Sparc/SparcAsmPrinter.cpp b/lib/Target/Sparc/SparcAsmPrinter.cpp
index 1f82326..98d59ee 100644
--- a/lib/Target/Sparc/SparcAsmPrinter.cpp
+++ b/lib/Target/Sparc/SparcAsmPrinter.cpp
@@ -286,6 +286,5 @@ bool SparcAsmPrinter::doFinalization(Module &M) {
}
}
- AsmPrinter::doFinalization(M);
- return false; // success
+ return AsmPrinter::doFinalization(M);
}
diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp
index 59b9b1f..90c3f32 100644
--- a/lib/Target/X86/X86AsmPrinter.cpp
+++ b/lib/Target/X86/X86AsmPrinter.cpp
@@ -120,13 +120,13 @@ bool X86SharedAsmPrinter::doInitialization(Module &M) {
DW.BeginModule(&M);
}
- AsmPrinter::doInitialization(M);
+ bool Result = AsmPrinter::doInitialization(M);
// Darwin wants symbols to be quoted if they have complex names.
if (Subtarget->isTargetDarwin())
Mang->setUseQuotes(true);
- return false;
+ return Result;
}
bool X86SharedAsmPrinter::doFinalization(Module &M) {
@@ -389,8 +389,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
DW.EndModule();
}
- AsmPrinter::doFinalization(M);
- return false; // success
+ return AsmPrinter::doFinalization(M);
}
/// createX86CodePrinterPass - Returns a pass that prints the X86 assembly code
diff --git a/lib/Target/X86/X86IntelAsmPrinter.cpp b/lib/Target/X86/X86IntelAsmPrinter.cpp
index 39b65ee..60d7ed6 100644
--- a/lib/Target/X86/X86IntelAsmPrinter.cpp
+++ b/lib/Target/X86/X86IntelAsmPrinter.cpp
@@ -339,7 +339,7 @@ void X86IntelAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
}
bool X86IntelAsmPrinter::doInitialization(Module &M) {
- X86SharedAsmPrinter::doInitialization(M);
+ bool Result = X86SharedAsmPrinter::doInitialization(M);
Mang->markCharUnacceptable('.');
@@ -373,7 +373,7 @@ bool X86IntelAsmPrinter::doInitialization(Module &M) {
}
}
- return false;
+ return Result;
}
bool X86IntelAsmPrinter::doFinalization(Module &M) {
@@ -463,10 +463,10 @@ bool X86IntelAsmPrinter::doFinalization(Module &M) {
}
// Bypass X86SharedAsmPrinter::doFinalization().
- AsmPrinter::doFinalization(M);
+ bool Result = AsmPrinter::doFinalization(M);
SwitchToDataSection("");
O << "\tend\n";
- return false; // success
+ return Result;
}
void X86IntelAsmPrinter::EmitString(const ConstantArray *CVA) const {