aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-02-22 16:44:27 +0000
committerDouglas Gregor <dgregor@apple.com>2010-02-22 16:44:27 +0000
commitaef605d0089cdff75f1abf90fe121e8dee39d55e (patch)
tree3f6002cd226488e17e12890a6b88b9f683c52bfd /lib/CodeGen
parentc3daac59e26b63c08208de2fbaceb1ff01be3492 (diff)
Don't use NamedDecl::getNameAsCString() when dealing with C++ methods,
since they may not have normal identifiers for names. Fixes PR6369. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGVtable.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp
index d49f1ad0f1..43fd56ae5f 100644
--- a/lib/CodeGen/CGVtable.cpp
+++ b/lib/CodeGen/CGVtable.cpp
@@ -1877,10 +1877,10 @@ private:
// If already set, note the two sets as the same
if (0)
printf("%s::%s same as %s::%s\n",
- PrevU->getParent()->getNameAsCString(),
- PrevU->getNameAsCString(),
- U->getParent()->getNameAsCString(),
- U->getNameAsCString());
+ PrevU->getParent()->getNameAsString().c_str(),
+ PrevU->getNameAsString().c_str(),
+ U->getParent()->getNameAsString().c_str(),
+ U->getNameAsString().c_str());
ForwardUnique[PrevU] = U;
return;
}
@@ -1888,11 +1888,11 @@ private:
// Not set, set it now
if (0)
printf("marking %s::%s %p override as %s::%s\n",
- MD->getParent()->getNameAsCString(),
- MD->getNameAsCString(),
+ MD->getParent()->getNameAsString().c_str(),
+ MD->getNameAsString().c_str(),
(void*)MD,
- U->getParent()->getNameAsCString(),
- U->getNameAsCString());
+ U->getParent()->getNameAsString().c_str(),
+ U->getNameAsString().c_str());
UniqueOverrider[MD] = U;
for (CXXMethodDecl::method_iterator mi = MD->begin_overridden_methods(),
@@ -1914,8 +1914,8 @@ private:
BuildUniqueOverrider(MD, MD);
if (0)
printf("top set is %s::%s %p\n",
- MD->getParent()->getNameAsCString(),
- MD->getNameAsCString(),
+ MD->getParent()->getNameAsString().c_str(),
+ MD->getNameAsString().c_str(),
(void*)MD);
ForwardUnique[MD] = MD;
}
@@ -1950,7 +1950,7 @@ private:
A_t::iterator J = I;
while (++J != E && DclCmp(I, J) == 0)
if (DclIsSame(*I, *J)) {
- if (0) printf("connecting %s\n", (*I)->getNameAsCString());
+ if (0) printf("connecting %s\n", (*I)->getNameAsString().c_str());
ForwardUnique[*J] = *I;
}
}
@@ -2178,7 +2178,7 @@ public:
return;
D1(printf(" vfn for %s at %d\n",
- dyn_cast<CXXMethodDecl>(GD.getDecl())->getNameAsCString(),
+ dyn_cast<CXXMethodDecl>(GD.getDecl())->getNameAsString().c_str(),
(int)Methods.size()));
// We didn't find an entry in the vtable that we could use, add a new
@@ -2201,7 +2201,7 @@ public:
idx = VCalls.size()+1;
VCalls.push_back(Offset/8 - CurrentVBaseOffset/8);
D1(printf(" vcall for %s at %d with delta %d\n",
- dyn_cast<CXXMethodDecl>(GD.getDecl())->getNameAsCString(),
+ dyn_cast<CXXMethodDecl>(GD.getDecl())->getNameAsString().c_str(),
(int)-VCalls.size()-3, (int)VCalls[idx-1]));
}
}