diff options
author | Manoj Gupta <manojgupta@google.com> | 2019-09-30 11:06:32 -0700 |
---|---|---|
committer | Manoj Gupta <manojgupta@chromium.org> | 2019-09-30 18:19:28 +0000 |
commit | 863cf12300c6d7c7c130b51f760853bd59796234 (patch) | |
tree | 7a175e0a79940322f5c8b4c17b61b4c2b9285b7e /llvm_tools/get_llvm_hash.py | |
parent | bbb3c8113eb9c8b44d727874ae46066e7f2ca81b (diff) | |
download | toolchain-utils-863cf12300c6d7c7c130b51f760853bd59796234.tar.gz |
llvm_tools: Fix error in getting a fixed SVN version.
llvm_hash was not initialized when using a fixed SVN version.
Fixes the error: UnboundLocalError: local variable 'llvm_hash'
referenced before assignment
BUG=None
TEST=Unit tests pass
Change-Id: I83d68908801325c7827b090e6bb472bc54bb3d75
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1831791
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Diffstat (limited to 'llvm_tools/get_llvm_hash.py')
-rwxr-xr-x | llvm_tools/get_llvm_hash.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm_tools/get_llvm_hash.py b/llvm_tools/get_llvm_hash.py index 51cbe40a..914bbfbf 100755 --- a/llvm_tools/get_llvm_hash.py +++ b/llvm_tools/get_llvm_hash.py @@ -200,6 +200,8 @@ def GetLLVMHashAndVersionFromSVNOption(svn_option): tot_commit_message) elif isinstance(svn_option, int): llvm_version = svn_option + llvm_hash = new_llvm_hash.GetGitHashForVersion( + GetAndUpdateLLVMProjectInLLVMTools(), llvm_version) else: assert svn_option in ('google3', 'google3-unstable') llvm_version = GetGoogle3LLVMVersion(stable=svn_option == 'google3') |