summaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-22 07:06:15 +0000
committerChris Lattner <sabre@nondot.org>2010-01-22 07:06:15 +0000
commit07404415ab97883b80d0dd87f1c5308e4eccbfd4 (patch)
tree623859861aa43da8a155e408f49e54750d6c19e5 /lib/CodeGen
parente73a31f667ad2fe03e25c97ac45b58c30d7f07c3 (diff)
downloadllvm-07404415ab97883b80d0dd87f1c5308e4eccbfd4.tar.gz
llvm-07404415ab97883b80d0dd87f1c5308e4eccbfd4.tar.bz2
llvm-07404415ab97883b80d0dd87f1c5308e4eccbfd4.tar.xz
pass "-fasm-verbose" into createAsmStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94165 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 32e9036af9..d5ae71f8ea 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -50,6 +50,15 @@ static cl::opt<cl::boolOrDefault>
AsmVerbose("asm-verbose", cl::desc("Add comments to directives."),
cl::init(cl::BOU_UNSET));
+static bool getVerboseAsm(bool VDef) {
+ switch (AsmVerbose) {
+ default:
+ case cl::BOU_UNSET: return VDef;
+ case cl::BOU_TRUE: return true;
+ case cl::BOU_FALSE: return false;
+ }
+}
+
char AsmPrinter::ID = 0;
AsmPrinter::AsmPrinter(formatted_raw_ostream &o, TargetMachine &tm,
const MCAsmInfo *T, bool VDef)
@@ -59,15 +68,12 @@ AsmPrinter::AsmPrinter(formatted_raw_ostream &o, TargetMachine &tm,
OutContext(*new MCContext()),
// FIXME: Pass instprinter to streamer.
OutStreamer(*createAsmStreamer(OutContext, O, *T,
- TM.getTargetData()->isLittleEndian(), 0)),
+ TM.getTargetData()->isLittleEndian(),
+ getVerboseAsm(VDef), 0)),
LastMI(0), LastFn(0), Counter(~0U), PrevDLT(NULL) {
DW = 0; MMI = 0;
- switch (AsmVerbose) {
- case cl::BOU_UNSET: VerboseAsm = VDef; break;
- case cl::BOU_TRUE: VerboseAsm = true; break;
- case cl::BOU_FALSE: VerboseAsm = false; break;
- }
+ VerboseAsm = getVerboseAsm(VDef);
}
AsmPrinter::~AsmPrinter() {