summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-07-31 16:07:31 +0000
committerDouglas Gregor <dgregor@apple.com>2009-07-31 16:07:31 +0000
commit1d1d16c43e5899111c2340e0b8057eb2254708e7 (patch)
tree534a821d06f7d98d01079e4a4a741372bfdc7900 /clang/lib
parentc97f09f5655b24983c1b0da821fb8d56a0cb0153 (diff)
downloadbcm5719-llvm-1d1d16c43e5899111c2340e0b8057eb2254708e7.tar.gz
bcm5719-llvm-1d1d16c43e5899111c2340e0b8057eb2254708e7.zip
Make canonicalization of overloaded function declarations match the
Itanium C++ ABI's name mangling, since both are related to the notion of "equivalent" function templates. llvm-svn: 77678
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/StmtProfile.cpp22
1 files changed, 3 insertions, 19 deletions
diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp
index 5a04df04065..d0f02ae95bc 100644
--- a/clang/lib/AST/StmtProfile.cpp
+++ b/clang/lib/AST/StmtProfile.cpp
@@ -629,25 +629,9 @@ void StmtProfiler::VisitDecl(Decl *D) {
}
if (OverloadedFunctionDecl *Ovl = dyn_cast<OverloadedFunctionDecl>(D)) {
- // Canonicalize all of the function declarations within the overload
- // set.
- llvm::SmallVector<Decl *, 4> Functions;
- for (OverloadedFunctionDecl::function_iterator F = Ovl->function_begin(),
- FEnd = Ovl->function_end();
- F != FEnd; ++F)
- Functions.push_back(F->get()->getCanonicalDecl());
-
- // Sorting the functions based on the point means that the ID generated
- // will be different from one execution of the compiler to another.
- // Since these IDs don't persist over time, the change in ordering will
- // not affect compilation.
- std::sort(Functions.begin(), Functions.end());
-
- for (llvm::SmallVector<Decl *, 4>::iterator F = Functions.begin(),
- FEnd = Functions.end();
- F != FEnd; ++F)
- VisitDecl(*F);
-
+ // The Itanium C++ ABI mangles references to a set of overloaded
+ // functions using just the function name, so we do the same here.
+ VisitName(Ovl->getDeclName());
return;
}
}
OpenPOWER on IntegriCloud