[opt-viewer] Handle column number 0

The asm-printer now emits remarks with function location which have
unspecified (0) source column number.

llvm-svn: 296547
This commit is contained in:
Adam Nemet 2017-02-28 23:59:46 +00:00
parent abe46080d4
commit 9c512a539e
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ class SourceFileRenderer:
# Column is the number of characters *including* tabs, keep those and
# replace everything else with spaces.
indent = line[:r.Column - 1]
indent = line[:max(r.Column, 1) - 1]
indent = re.sub('\S', ' ', indent)
print('''