summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/finishSwigWrapperClasses.py
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-04-03 17:19:43 +0000
committerZachary Turner <zturner@google.com>2015-04-03 17:19:43 +0000
commiteaa9266ec516b66c4aba79988c67dad39357b59a (patch)
treeb7ed1eef4f69274ee643df4a7b3c0397f15a5a3c /lldb/scripts/finishSwigWrapperClasses.py
parent1ad50ba966bcb1f628a30ab3782779c2e35c69b0 (diff)
downloadbcm5719-llvm-eaa9266ec516b66c4aba79988c67dad39357b59a.tar.gz
bcm5719-llvm-eaa9266ec516b66c4aba79988c67dad39357b59a.zip
Don't use literal slashes when concatenating paths in Python.
This patch fixes the swig generation scripts to use os.path.join instead, which produces correctly normalized paths for platforms that don't use the standard forward slash separator. llvm-svn: 234030
Diffstat (limited to 'lldb/scripts/finishSwigWrapperClasses.py')
-rw-r--r--lldb/scripts/finishSwigWrapperClasses.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/lldb/scripts/finishSwigWrapperClasses.py b/lldb/scripts/finishSwigWrapperClasses.py
index 75f7d46dd2f..ca2cbc3f5f9 100644
--- a/lldb/scripts/finishSwigWrapperClasses.py
+++ b/lldb/scripts/finishSwigWrapperClasses.py
@@ -199,9 +199,8 @@ def run_post_process( vStrScriptLang, vstrFinishFileName, vDictArgs ):
nResult = 0;
strStatusMsg = "";
strScriptFile = vstrFinishFileName % vStrScriptLang;
- strScriptFileDir = "%s%s/%s" % (vDictArgs[ "--srcRoot" ], "/scripts",
- vStrScriptLang);
- strScriptFilePath = "%s/%s" % (strScriptFileDir, strScriptFile);
+ strScriptFileDir = os.path.normpath(os.path.join(vDictArgs["--srcRoot"], "scripts", vStrScriptLang));
+ strScriptFilePath = os.path.join(strScriptFileDir, strScriptFile);
# Check for the existence of the script file
strPath = os.path.normcase( strScriptFilePath );
@@ -245,7 +244,7 @@ def run_post_process_for_each_script_supported( vDictArgs ):
dbg = utilsDebug.CDebugFnVerbose( "run_post_process_for_each_script_supported()" );
nResult = 0;
strStatusMsg = "";
- strScriptDir = vDictArgs[ "--srcRoot" ] + "/scripts";
+ strScriptDir = os.path.normpath(os.path.join(vDictArgs["--srcRoot"], "scripts"));
strFinishFileName = "finishSwig%sLLDB.py";
# Check for the existence of the scripts folder
OpenPOWER on IntegriCloud