aboutsummaryrefslogtreecommitdiffstats
path: root/support/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-06-05 17:55:27 +0000
committerChris Lattner <sabre@nondot.org>2002-06-05 17:55:27 +0000
commitd6c5104baf3e8edd6e0a61f284291351ae038319 (patch)
treec4dc8d377f7429b83230b8cf25717075c40d88fa /support/lib
parent9fcccb0f36ccd1a422f3fbb1b5afbb80d3c08511 (diff)
downloadexternal_llvm-d6c5104baf3e8edd6e0a61f284291351ae038319.zip
external_llvm-d6c5104baf3e8edd6e0a61f284291351ae038319.tar.gz
external_llvm-d6c5104baf3e8edd6e0a61f284291351ae038319.tar.bz2
Fix const problems
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'support/lib')
-rw-r--r--support/lib/Support/NameMangling.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/support/lib/Support/NameMangling.cpp b/support/lib/Support/NameMangling.cpp
index 7fbcfde..7dc612b 100644
--- a/support/lib/Support/NameMangling.cpp
+++ b/support/lib/Support/NameMangling.cpp
@@ -17,15 +17,15 @@ string MangleTypeName(const Type *Ty) {
if (Ty->isPrimitiveType()) {
const string &longName = Ty->getDescription();
return string(longName.c_str(), (longName.length() < 2) ? 1 : 2);
- } else if (PointerType *PTy = dyn_cast<PointerType>(Ty)) {
+ } else if (const PointerType *PTy = dyn_cast<PointerType>(Ty)) {
mangledName = string("P_" + MangleTypeName(PTy->getElementType()));
- } else if (StructType *STy = dyn_cast<StructType>(Ty)) {
+ } else if (const StructType *STy = dyn_cast<StructType>(Ty)) {
mangledName = string("S_");
for (unsigned i=0; i < STy->getNumContainedTypes(); ++i)
mangledName += MangleTypeName(STy->getContainedType(i));
- } else if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
+ } else if (const ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
mangledName = string("A_" +MangleTypeName(ATy->getElementType()));
- } else if (FunctionType *FTy = dyn_cast<FunctionType>(Ty)) {
+ } else if (const FunctionType *FTy = dyn_cast<FunctionType>(Ty)) {
mangledName = string("M_") + MangleTypeName(FTy->getReturnType());
for (unsigned i = 1; i < FTy->getNumContainedTypes(); ++i)
mangledName += string(MangleTypeName(FTy->getContainedType(i)));