forked from OSchip/llvm-project
[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:
parent
abe46080d4
commit
9c512a539e
|
@ -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('''
|
||||
|
|
Loading…
Reference in New Issue