Fix WriteAsOperand to not emit a leading space character. Adjust
authorDan Gohman <gohman@apple.com>
Sun, 14 Sep 2008 17:21:12 +0000 (17:21 +0000)
committerDan Gohman <gohman@apple.com>
Sun, 14 Sep 2008 17:21:12 +0000 (17:21 +0000)
commit8dae138d06df9cecbee421ef645d0b74f9ac13d7
tree2261c78107eccfa0aaa6762421bc268d6c7bd627
parente009180f2bbcf5edbe3b583936c37c4b3be2d082
Fix WriteAsOperand to not emit a leading space character. Adjust
its callers to emit a space character before calling it when a
space is needed.

This fixes several spurious whitespace issues in
ScalarEvolution's debug dumps. See the test changes for
examples.

This also fixes odd space-after-tab indentation in the output
for switch statements, and changes calls from being printed like
this:
  call void @foo( i32 %x )
to this:
  call void @foo(i32 %x)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56196 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
lib/Analysis/ScalarEvolution.cpp
lib/VMCore/AsmWriter.cpp
test/Analysis/LoopInfo/2003-05-15-NestingProblem.ll
test/Analysis/ScalarEvolution/2007-07-15-NegativeStride.ll
test/Analysis/ScalarEvolution/2007-08-06-Unsigned.ll
test/Analysis/ScalarEvolution/2008-02-12-SMAXTripCount.ll
test/Analysis/ScalarEvolution/2008-07-29-SGTTripCount.ll
test/Analysis/ScalarEvolution/2008-07-29-SMinExpr.ll
test/Analysis/ScalarEvolution/2008-08-04-IVOverflow.ll
test/Analysis/ScalarEvolution/2008-08-04-LongAddRec.ll
test/Analysis/ScalarEvolution/avoid-smax.ll
test/Analysis/ScalarEvolution/smax.ll