commit | 571fe348ab28d7d05de6a68dc18c88aff542b571 | [log] [tgz] |
---|---|---|
author | zmo@google.com <zmo@google.com@736b8ea6-26fd-11df-bfd4-992fa37f6226> | Tue Apr 17 17:40:29 2012 +0000 |
committer | zmo@google.com <zmo@google.com@736b8ea6-26fd-11df-bfd4-992fa37f6226> | Tue Apr 17 17:40:29 2012 +0000 |
tree | 1ad830d9cfcbfa9dd39d93a1436f008a7612d97b | |
parent | 1023bb559906b2f6604c66071f311e1ae0ec893e [diff] [blame] |
Don't append '_' to the end of prefix in long name mapping if the original name starts with '_' Otherwise we will have '__' which is illegal. Review URL: https://codereview.appspot.com/5978058 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1044 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/MapLongVariableNames.cpp b/src/compiler/MapLongVariableNames.cpp index 0c7e1a9..a503101 100644 --- a/src/compiler/MapLongVariableNames.cpp +++ b/src/compiler/MapLongVariableNames.cpp
@@ -15,7 +15,9 @@ stream << "webgl_"; if (isGlobal) stream << "g"; - stream << id << "_"; + stream << id; + if (name[0] != '_') + stream << "_"; stream << name.substr(0, MAX_SHORTENED_IDENTIFIER_SIZE - stream.str().size()); return stream.str(); }