diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-11-02 16:54:00 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-11-02 16:54:00 +0000 |
commit | 7281d1fbea62a4549b045bb7dc434904f2b609d8 (patch) | |
tree | f3a314419155273340fc9c3979da8d838d8a3b97 /lib/CodeGen/Mangle.cpp | |
parent | bf8cafadb9d4e0d7a90fe78fc175efb80ae34d42 (diff) |
Fix a crash mangling decayed val argument-typed function.
// rdar: //8620510 and PR7666
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118019 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/Mangle.cpp')
-rw-r--r-- | lib/CodeGen/Mangle.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp index e47d9cb43a..37ecf28598 100644 --- a/lib/CodeGen/Mangle.cpp +++ b/lib/CodeGen/Mangle.cpp @@ -1324,7 +1324,9 @@ void CXXNameMangler::mangleType(const ConstantArrayType *T) { } void CXXNameMangler::mangleType(const VariableArrayType *T) { Out << 'A'; - mangleExpression(T->getSizeExpr()); + // decayed vla types (size 0) will just be skipped. + if (T->getSizeExpr()) + mangleExpression(T->getSizeExpr()); Out << '_'; mangleType(T->getElementType()); } |