[PATCH] getMangledTypeStr: add support for vectors
Sanjoy Das
sanjoy at playingwithpointers.com
Sat Jan 10 16:37:44 PST 2015
Two nits inline. Also, do we need a test case here?
================
Comment at: lib/IR/Function.cpp:451
@@ -450,3 +450,3 @@
/// of named types is simply their name. Manglings for unnamed types consist
/// of a prefix ('p' for pointers, 'a' for arrays, 'f_' for functions)
/// combined with the mangling of their component types. A vararg function
----------------
Modify this comment to reflect that we handle vectors too.
================
Comment at: lib/IR/Function.cpp:466
@@ -465,1 +465,3 @@
getMangledTypeStr(ATyp->getElementType());
+ } else if (VectorType* ATyp = dyn_cast<VectorType>(Ty)) {
+ Result += "v" + llvm::utostr(ATyp->getNumElements()) +
----------------
I think this will be better as `VectorType* VTyp = dyn_cast<VectorType>(Ty)`
http://reviews.llvm.org/D6915
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list