Skip to content

Commit

Permalink
Fixed mangling of OpenCL vector types.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Bader committed Jun 4, 2015
1 parent e83395a commit f111ce6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/AST/ItaniumMangle.cpp
Expand Up @@ -1764,7 +1764,9 @@ void CXXNameMangler::mangleType(QualType T) {
Qualifiers quals = split.Quals;
const Type *ty = split.Ty;

bool isSubstitutable = quals || !isa<BuiltinType>(T);
// OpenCL vector types like int4 are built-in types and they aren't substitutable.
// Current implementation defines them as ExtVectorType, which is not a built-in type.
bool isSubstitutable = quals || (!isa<BuiltinType>(T) && !(Context.getASTContext().getLangOpts().OpenCL && isa<ExtVectorType>(T)));
if (isSubstitutable && mangleSubstitution(T))
return;

Expand Down

0 comments on commit f111ce6

Please sign in to comment.