diff options
| author | Anders Carlsson <andersca@mac.com> | 2010-02-06 04:52:27 +0000 |
|---|---|---|
| committer | Anders Carlsson <andersca@mac.com> | 2010-02-06 04:52:27 +0000 |
| commit | 2c4de4c31eb1069d76314881d1fb79bdfe98c953 (patch) | |
| tree | 904a83f009a83943121bd87d67ceff6bf8a82042 /clang/lib | |
| parent | bdfcacbe8f6631360243c0ff8429c06f77a1aa94 (diff) | |
| download | bcm5719-llvm-2c4de4c31eb1069d76314881d1fb79bdfe98c953.tar.gz bcm5719-llvm-2c4de4c31eb1069d76314881d1fb79bdfe98c953.zip | |
Only append 'L' for internal variable declarations, not all declarations. (Found by the mangle checker, yay)
llvm-svn: 95485
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/CodeGen/Mangle.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/Mangle.cpp b/clang/lib/CodeGen/Mangle.cpp index 9ac5956a644..a302225c7f7 100644 --- a/clang/lib/CodeGen/Mangle.cpp +++ b/clang/lib/CodeGen/Mangle.cpp @@ -482,9 +482,10 @@ void CXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND, case DeclarationName::Identifier: { if (const IdentifierInfo *II = Name.getAsIdentifierInfo()) { // We must avoid conflicts between internally- and externally- - // linked names in the same TU. This naming convention is the - // same as that followed by GCC, though it shouldn't actually matter. - if (ND && ND->getLinkage() == InternalLinkage && + // linked variable declaration names in the same TU. + // This naming convention is the same as that followed by GCC, though it + // shouldn't actually matter. + if (ND && isa<VarDecl>(ND) && ND->getLinkage() == InternalLinkage && ND->getDeclContext()->isFileContext()) Out << 'L'; |

