summaryrefslogtreecommitdiffstats
path: root/llvm/test/Scripts
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2010-08-30 15:19:56 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2010-08-30 15:19:56 +0000
commite53cf6f85d06b2214b6ae009f43eef521ab84e57 (patch)
treed8a5e8b694d2aa127deca8ba25bbb17c40f0e264 /llvm/test/Scripts
parent3cc2648b476e4b87e355dea3b16981a1f7498532 (diff)
downloadbcm5719-llvm-e53cf6f85d06b2214b6ae009f43eef521ab84e57.tar.gz
bcm5719-llvm-e53cf6f85d06b2214b6ae009f43eef521ab84e57.zip
coff-dump.py: Fix PR7996. Now it is compatible to Python-2.4.
llvm-svn: 112485
Diffstat (limited to 'llvm/test/Scripts')
-rwxr-xr-xllvm/test/Scripts/coff-dump.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/test/Scripts/coff-dump.py b/llvm/test/Scripts/coff-dump.py
index 464ab3110b4..0af3d368d5d 100755
--- a/llvm/test/Scripts/coff-dump.py
+++ b/llvm/test/Scripts/coff-dump.py
@@ -397,8 +397,11 @@ def handle_enum(entry):
selector = read_value (definitions [0])
definitions = definitions [1] [selector]
- description = definitions[value] if value in definitions else "unknown"
-
+ if value in definitions:
+ description = definitions[value]
+ else:
+ description = "unknown"
+
write ("%s (" % description)
write_value (oformat, value)
write (")")
OpenPOWER on IntegriCloud