diff options
author | Alexis Hunt <alercah@gmail.com> | 2011-05-24 22:41:36 +0000 |
---|---|---|
committer | Alexis Hunt <alercah@gmail.com> | 2011-05-24 22:41:36 +0000 |
commit | e852b100e26c818788708a2379d047e157ea316f (patch) | |
tree | 4df08da63c06554866280991bc227909575cce98 /clang/lib/AST/ItaniumMangle.cpp | |
parent | 93e7b3a8bdbe1a9edb1c3d6524ed858377b35e62 (diff) | |
download | bcm5719-llvm-e852b100e26c818788708a2379d047e157ea316f.tar.gz bcm5719-llvm-e852b100e26c818788708a2379d047e157ea316f.zip |
Implement a new type node, UnaryTransformType, designed to represent a
type that turns one type into another. This is used as the basis to
implement __underlying_type properly - with TypeSourceInfo and proper
behavior in the face of templates.
llvm-svn: 132017
Diffstat (limited to 'clang/lib/AST/ItaniumMangle.cpp')
-rw-r--r-- | clang/lib/AST/ItaniumMangle.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp index e368c8927f7..aad6e9c48de 100644 --- a/clang/lib/AST/ItaniumMangle.cpp +++ b/clang/lib/AST/ItaniumMangle.cpp @@ -1939,6 +1939,22 @@ void CXXNameMangler::mangleType(const DecltypeType *T) { Out << 'E'; } +void CXXNameMangler::mangleType(const UnaryTransformType *T) { + // If this is dependent, we need to record that. If not, we simply + // mangle it as the underlying type since they are equivalent. + if (T->isDependentType()) { + Out << 'U'; + + switch (T->getUTTKind()) { + case UnaryTransformType::EnumUnderlyingType: + Out << "3eut"; + break; + } + } + + mangleType(T->getUnderlyingType()); +} + void CXXNameMangler::mangleType(const AutoType *T) { QualType D = T->getDeducedType(); // <builtin-type> ::= Da # dependent auto |