Skip to content

Commit

Permalink
Use SmallVector
Browse files Browse the repository at this point in the history
Co-authored-by: Nikita Popov <github@npopov.com>
  • Loading branch information
Mark-Simulacrum and nikic authored Apr 15, 2024
1 parent 07d6015 commit 34c110e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,7 @@ extern "C" LLVMValueRef LLVMRustBuildCall(LLVMBuilderRef B, LLVMTypeRef Ty, LLVM
FunctionType *FTy = unwrap<FunctionType>(Ty);

// FIXME: Is there a way around this?
std::vector<OperandBundleDef> OpBundles;
SmallVector<OperandBundleDef> OpBundles;
OpBundles.reserve(NumOpBundles);
for (unsigned i = 0; i < NumOpBundles; ++i) {
OpBundles.push_back(*OpBundlesIndirect[i]);
Expand Down Expand Up @@ -1584,7 +1584,7 @@ LLVMRustBuildInvoke(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Fn,
FunctionType *FTy = unwrap<FunctionType>(Ty);

// FIXME: Is there a way around this?
std::vector<OperandBundleDef> OpBundles;
SmallVector<OperandBundleDef> OpBundles;
OpBundles.reserve(NumOpBundles);
for (unsigned i = 0; i < NumOpBundles; ++i) {
OpBundles.push_back(*OpBundlesIndirect[i]);
Expand Down Expand Up @@ -1614,7 +1614,7 @@ LLVMRustBuildCallBr(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Fn,
}

// FIXME: Is there a way around this?
std::vector<OperandBundleDef> OpBundles;
SmallVector<OperandBundleDef> OpBundles;
OpBundles.reserve(NumOpBundles);
for (unsigned i = 0; i < NumOpBundles; ++i) {
OpBundles.push_back(*OpBundlesIndirect[i]);
Expand Down

0 comments on commit 34c110e

Please sign in to comment.