[cfe-commits] r105699 - /cfe/trunk/lib/CodeGen/Mangle.cpp
John McCall
rjmccall at apple.com
Wed Jun 9 00:26:17 PDT 2010
Author: rjmccall
Date: Wed Jun 9 02:26:17 2010
New Revision: 105699
URL: http://llvm.org/viewvc/llvm-project?rev=105699&view=rev
Log:
Correctly handle > 257 substitutions in a single mangling, and don't introduce
a spurious substitution for an unscoped dependent template-id after introducing
a substitution for the scoped template-id.
Modified:
cfe/trunk/lib/CodeGen/Mangle.cpp
Modified: cfe/trunk/lib/CodeGen/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.cpp?rev=105699&r1=105698&r2=105699&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Wed Jun 9 02:26:17 2010
@@ -1374,16 +1374,14 @@
mangleSourceName(T->getIdentifier());
} else {
const TemplateSpecializationType *TST = T->getTemplateId();
- if (!mangleSubstitution(QualType(TST, 0))) {
- mangleTemplatePrefix(TST->getTemplateName());
+
+ mangleTemplatePrefix(TST->getTemplateName());
- // FIXME: GCC does not appear to mangle the template arguments when
- // the template in question is a dependent template name. Should we
- // emulate that badness?
- mangleTemplateArgs(TST->getTemplateName(), TST->getArgs(),
- TST->getNumArgs());
- addSubstitution(QualType(TST, 0));
- }
+ // FIXME: GCC does not appear to mangle the template arguments when
+ // the template in question is a dependent template name. Should we
+ // emulate that badness?
+ mangleTemplateArgs(TST->getTemplateName(), TST->getArgs(),
+ TST->getNumArgs());
}
Out << 'E';
@@ -1950,7 +1948,7 @@
while (SeqID) {
assert(BufferPtr > Buffer && "Buffer overflow!");
- unsigned char c = static_cast<unsigned char>(SeqID) % 36;
+ char c = static_cast<char>(SeqID % 36);
*--BufferPtr = (c < 10 ? '0' + c : 'A' + c - 10);
SeqID /= 36;
More information about the cfe-commits
mailing list