[llvm] 89d3031 - llvm-lit.in: Use a raw string for LLVM_SOURCE_DIR

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Mon May 11 16:06:29 PDT 2020


Author: Nico Weber
Date: 2020-05-11T19:05:53-04:00
New Revision: 89d3031b3ce13cc453d04cf02036a5e7d6b72524

URL: https://github.com/llvm/llvm-project/commit/89d3031b3ce13cc453d04cf02036a5e7d6b72524
DIFF: https://github.com/llvm/llvm-project/commit/89d3031b3ce13cc453d04cf02036a5e7d6b72524.diff

LOG: llvm-lit.in: Use a raw string for LLVM_SOURCE_DIR

In case the path from cmake build dir contains a backslash
escape on Windows (which uses \ as path separator).

While here, consistently use one form of quotes in this file.

No intended behavior change.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/utils/llvm-lit/llvm-lit.in b/llvm/utils/llvm-lit/llvm-lit.in
index bb510b4bc400..bfa55c6abfac 100755
--- a/llvm/utils/llvm-lit/llvm-lit.in
+++ b/llvm/utils/llvm-lit/llvm-lit.in
@@ -15,14 +15,14 @@ def map_config(source_dir, site_config):
 
 # Set up some builtin parameters, so that by default the LLVM test suite
 # configuration file knows how to find the object tree.
-builtin_parameters = { 'build_mode' : "@BUILD_MODE@" }
+builtin_parameters = { 'build_mode' : '@BUILD_MODE@' }
 
 @LLVM_LIT_CONFIG_MAP@
 
 builtin_parameters['config_map'] = config_map
 
 # Make sure we can find the lit package.
-llvm_source_root = path("@LLVM_SOURCE_DIR@")
+llvm_source_root = path(r'@LLVM_SOURCE_DIR@')
 sys.path.insert(0, os.path.join(llvm_source_root, 'utils', 'lit'))
 
 if __name__=='__main__':


        


More information about the llvm-commits mailing list