[cfe-commits] r148204 - in /cfe/trunk: include/clang/Sema/SemaFixItUtils.h lib/Sema/SemaExpr.cpp lib/Sema/SemaOverload.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sat Jan 14 13:05:10 PST 2012
Author: d0k
Date: Sat Jan 14 15:05:10 2012
New Revision: 148204
URL: http://llvm.org/viewvc/llvm-project?rev=148204&view=rev
Log:
Use a smaller vector than SmallVector.
Shrinks OverloadCandidate from 208 to 168 bytes.
Modified:
cfe/trunk/include/clang/Sema/SemaFixItUtils.h
cfe/trunk/lib/Sema/SemaExpr.cpp
cfe/trunk/lib/Sema/SemaOverload.cpp
Modified: cfe/trunk/include/clang/Sema/SemaFixItUtils.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/SemaFixItUtils.h?rev=148204&r1=148203&r2=148204&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/SemaFixItUtils.h (original)
+++ cfe/trunk/include/clang/Sema/SemaFixItUtils.h Sat Jan 14 15:05:10 2012
@@ -39,7 +39,7 @@
ExprValueKind FromVK);
/// The list of Hints generated so far.
- SmallVector<FixItHint, 1> Hints;
+ std::vector<FixItHint> Hints;
/// The number of Conversions fixed. This can be different from the size
/// of the Hints vector since we allow multiple FixIts per conversion.
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=148204&r1=148203&r2=148204&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sat Jan 14 15:05:10 2012
@@ -9212,9 +9212,8 @@
// If we can fix the conversion, suggest the FixIts.
assert(ConvHints.isNull() || Hint.isNull());
if (!ConvHints.isNull()) {
- for (llvm::SmallVector<FixItHint, 1>::iterator
- HI = ConvHints.Hints.begin(), HE = ConvHints.Hints.end();
- HI != HE; ++HI)
+ for (std::vector<FixItHint>::iterator HI = ConvHints.Hints.begin(),
+ HE = ConvHints.Hints.end(); HI != HE; ++HI)
FDiag << *HI;
} else {
FDiag << Hint;
Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=148204&r1=148203&r2=148204&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Sat Jan 14 15:05:10 2012
@@ -7477,9 +7477,8 @@
<< (unsigned) (Cand->Fix.Kind);
// If we can fix the conversion, suggest the FixIts.
- for (SmallVector<FixItHint, 1>::iterator
- HI = Cand->Fix.Hints.begin(), HE = Cand->Fix.Hints.end();
- HI != HE; ++HI)
+ for (std::vector<FixItHint>::iterator HI = Cand->Fix.Hints.begin(),
+ HE = Cand->Fix.Hints.end(); HI != HE; ++HI)
FDiag << *HI;
S.Diag(Fn->getLocation(), FDiag);
More information about the cfe-commits
mailing list