[llvm] r351113 - [lit] llvm-lit.in: specify file encoding to UTF-8

George Karpenkov via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 14 12:02:12 PST 2019


Author: george.karpenkov
Date: Mon Jan 14 12:02:11 2019
New Revision: 351113

URL: http://llvm.org/viewvc/llvm-project?rev=351113&view=rev
Log:
[lit] llvm-lit.in: specify file encoding to UTF-8

This is needed because otherwise if source dir is at location whose path
contains non-ASCII character then python will complain about
SyntaxError.

SyntaxError: Non-ASCII character '\xc4' in file
/home/D?vis/libc++/src/build/bin/llvm-lit on line 16, but no encoding
declared; see http://python.org/dev/peps/pep-0263/ for details

Patch by davispuh

Differential Revision: https://reviews.llvm.org/D50201

Modified:
    llvm/trunk/utils/llvm-lit/llvm-lit.in

Modified: llvm/trunk/utils/llvm-lit/llvm-lit.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-lit/llvm-lit.in?rev=351113&r1=351112&r2=351113&view=diff
==============================================================================
--- llvm/trunk/utils/llvm-lit/llvm-lit.in (original)
+++ llvm/trunk/utils/llvm-lit/llvm-lit.in Mon Jan 14 12:02:11 2019
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# -*- coding: utf-8 -*-
 
 import os
 import sys




More information about the llvm-commits mailing list