summaryrefslogtreecommitdiff
path: root/tools/generate-operator-out.py
diff options
context:
space:
mode:
author Sebastien Hertz <shertz@google.com> 2015-06-09 14:09:14 +0200
committer Sebastien Hertz <shertz@google.com> 2015-06-09 17:17:09 +0200
commitf795869da0a1fa006fdcdacd8afb6149a63fc1a7 (patch)
treeb4cd23012e62b80788870f2c85c30fc6032299fa /tools/generate-operator-out.py
parent430afefe1cced35cf5eb12ce7a6dcbfc5007c97e (diff)
Follow up on CL 151605
- Fixes return type of StackedShadowFrameRecord::GetType - Makes StackedShadowFrameType an enum class (scoped enum) - Moves DeoptimizationReturnValueRecord and StackedShadowFrameRecord to thread.cc file and use forward declaration in thread.h header - Fixes tools/generate-operator-out.py for scoped enum classes. Bug: 20845490 Change-Id: I6b67e288b1db563699161e58ec2e2330d42dd8f5
Diffstat (limited to 'tools/generate-operator-out.py')
-rwxr-xr-xtools/generate-operator-out.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/generate-operator-out.py b/tools/generate-operator-out.py
index 2b57222049..c74508d9cd 100755
--- a/tools/generate-operator-out.py
+++ b/tools/generate-operator-out.py
@@ -154,10 +154,12 @@ def ProcessFile(filename):
sys.stderr.write('%s\n' % (rest))
Confused(filename, line_number, raw_line)
- if len(enclosing_classes) > 0:
- if is_enum_class:
- enum_value = enum_name + '::' + enum_value
- else:
+ # If the enum is scoped, we must prefix enum value with enum name (which is already prefixed
+ # by enclosing classes).
+ if is_enum_class:
+ enum_value = enum_name + '::' + enum_value
+ else:
+ if len(enclosing_classes) > 0:
enum_value = '::'.join(enclosing_classes) + '::' + enum_value
_ENUMS[enum_name].append((enum_value, enum_text))