Skip to content

Commit c62f31f

Browse files
committed
Inject llvm::SmallBitVector into namespace swift;
I also eliminated all llvm:: before SmallBitVector in the code base.
1 parent 2cf1f63 commit c62f31f

23 files changed

+86
-84
lines changed

include/swift/AST/Types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3077,7 +3077,7 @@ END_CAN_TYPE_WRAPPER(FunctionType, AnyFunctionType)
30773077
/// Map the given parameter list onto a bitvector describing whether
30783078
/// the argument type at each index has a default argument associated with
30793079
/// it.
3080-
llvm::SmallBitVector
3080+
SmallBitVector
30813081
computeDefaultMap(ArrayRef<AnyFunctionType::Param> params,
30823082
const ValueDecl *paramOwner, unsigned level);
30833083

include/swift/Basic/LLVM.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ namespace llvm {
4343
template<typename T> class TinyPtrVector;
4444
template<typename T> class Optional;
4545
template <typename PT1, typename PT2> class PointerUnion;
46+
class SmallBitVector;
4647

4748
// Other common classes.
4849
class raw_ostream;
@@ -76,6 +77,7 @@ namespace swift {
7677
using llvm::TinyPtrVector;
7778
using llvm::PointerUnion;
7879
using llvm::SmallSetVector;
80+
using llvm::SmallBitVector;
7981

8082
// Other common classes.
8183
using llvm::APFloat;

include/swift/SILOptimizer/Analysis/EscapeAnalysis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class EscapeAnalysis : public BottomUpIPAnalysis {
146146
/// Information where the node's value is used in its function.
147147
/// Each bit corresponds to an argument/instruction where the value is used.
148148
/// The UsePoints on demand when calling ConnectionGraph::getUsePoints().
149-
llvm::SmallBitVector UsePoints;
149+
SmallBitVector UsePoints;
150150

151151
/// The actual result of the escape analysis. It tells if and how (global or
152152
/// through arguments) the value escapes.

include/swift/SILOptimizer/Utils/Generics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void trySpecializeApplyOfGeneric(
5555
class ReabstractionInfo {
5656
/// A 1-bit means that this parameter/return value is converted from indirect
5757
/// to direct.
58-
llvm::SmallBitVector Conversions;
58+
SmallBitVector Conversions;
5959

6060
/// If set, indirect to direct conversions should be performed by the generic
6161
/// specializer.

include/swift/SILOptimizer/Utils/StackNesting.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ namespace swift {
4848
///
4949
class StackNesting {
5050

51-
typedef llvm::SmallBitVector BitVector;
51+
typedef SmallBitVector BitVector;
5252

5353
/// Data stored for each block (actually for each block which is not dead).
5454
struct BlockInfo {

lib/AST/ASTVerifier.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class Verifier : public ASTWalker {
237237
/// use the explicit closure sequence (false) or the implicit
238238
/// closure sequence (true).
239239
typedef llvm::PointerIntPair<DeclContext *, 1, bool> ClosureDiscriminatorKey;
240-
llvm::DenseMap<ClosureDiscriminatorKey, llvm::SmallBitVector>
240+
llvm::DenseMap<ClosureDiscriminatorKey, SmallBitVector>
241241
ClosureDiscriminators;
242242
DeclContext *CanonicalTopLevelContext = nullptr;
243243

@@ -830,7 +830,7 @@ class Verifier : public ASTWalker {
830830
}
831831

832832
/// Return the appropriate discriminator set for a closure expression.
833-
llvm::SmallBitVector &getClosureDiscriminators(AbstractClosureExpr *closure) {
833+
SmallBitVector &getClosureDiscriminators(AbstractClosureExpr *closure) {
834834
auto dc = getCanonicalDeclContext(closure->getParent());
835835
bool isAutoClosure = isa<AutoClosureExpr>(closure);
836836
return ClosureDiscriminators[ClosureDiscriminatorKey(dc, isAutoClosure)];

lib/AST/Type.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -742,10 +742,10 @@ Type TypeBase::replaceCovariantResultType(Type newResultType,
742742
return FunctionType::get(inputType, resultType, fnType->getExtInfo());
743743
}
744744

745-
llvm::SmallBitVector
745+
SmallBitVector
746746
swift::computeDefaultMap(ArrayRef<AnyFunctionType::Param> params,
747747
const ValueDecl *paramOwner, unsigned level) {
748-
llvm::SmallBitVector resultVector(params.size());
748+
SmallBitVector resultVector(params.size());
749749
// No parameter owner means no parameter list means no default arguments
750750
// - hand back the zeroed bitvector.
751751
//

lib/ClangImporter/ClangAdapter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ using namespace importer;
3131

3232
/// Get a bit vector indicating which arguments are non-null for a
3333
/// given function or method.
34-
llvm::SmallBitVector
34+
SmallBitVector
3535
importer::getNonNullArgs(const clang::Decl *decl,
3636
ArrayRef<const clang::ParmVarDecl *> params) {
37-
llvm::SmallBitVector result;
37+
SmallBitVector result;
3838
if (!decl)
3939
return result;
4040

lib/ClangImporter/ClangAdapter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ clang::SwiftNewtypeAttr *getSwiftNewtypeAttr(const clang::TypedefNameDecl *decl,
8282

8383
/// Retrieve a bit vector containing the non-null argument
8484
/// annotations for the given declaration.
85-
llvm::SmallBitVector
85+
SmallBitVector
8686
getNonNullArgs(const clang::Decl *decl,
8787
ArrayRef<const clang::ParmVarDecl *> params);
8888

lib/ClangImporter/ImportName.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ static bool shouldImportAsInitializer(const clang::ObjCMethodDecl *method,
797797
static bool omitNeedlessWordsInFunctionName(
798798
StringRef &baseName, SmallVectorImpl<StringRef> &argumentNames,
799799
ArrayRef<const clang::ParmVarDecl *> params, clang::QualType resultType,
800-
const clang::DeclContext *dc, const llvm::SmallBitVector &nonNullArgs,
800+
const clang::DeclContext *dc, const SmallBitVector &nonNullArgs,
801801
Optional<unsigned> errorParamIndex, bool returnsSelf, bool isInstanceMethod,
802802
NameImporter &nameImporter) {
803803
clang::ASTContext &clangCtx = nameImporter.getClangContext();

0 commit comments

Comments
 (0)