[PATCH] getMangledTypeStr: add support for vectors

Ramkumar Ramachandra artagnon at gmail.com
Sat Jan 10 16:23:32 PST 2015


Hi chandlerc, void, rafael,

There are many references to vector types like v16i32 throughout the
codebase, but nobody seems to be using the name mangler to get an
overloaded function name.

http://reviews.llvm.org/D6915

Files:
  lib/IR/Function.cpp

Index: lib/IR/Function.cpp
===================================================================
--- lib/IR/Function.cpp
+++ lib/IR/Function.cpp
@@ -463,6 +463,9 @@
   } else if (ArrayType* ATyp = dyn_cast<ArrayType>(Ty)) {
     Result += "a" + llvm::utostr(ATyp->getNumElements()) +
       getMangledTypeStr(ATyp->getElementType());
+  } else if (VectorType* ATyp = dyn_cast<VectorType>(Ty)) {
+    Result += "v" + llvm::utostr(ATyp->getNumElements()) +
+      getMangledTypeStr(ATyp->getElementType());
   } else if (StructType* STyp = dyn_cast<StructType>(Ty)) {
     if (!STyp->isLiteral())
       Result += STyp->getName();

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6915.17979.patch
Type: text/x-patch
Size: 627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150111/15a792f7/attachment.bin>


More information about the llvm-commits mailing list