Skip to content

Commit b805c68

Browse files
committed
Run clang-format on file.
llvm-svn: 194219
1 parent 8890460 commit b805c68

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

llvm/unittests/Linker/LinkModulesTest.cpp

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ class LinkModuleTest : public testing::Test {
2424
virtual void SetUp() {
2525
LLVMContext &Ctx = getGlobalContext();
2626
M.reset(new Module("MyModule", Ctx));
27-
FunctionType *FTy = FunctionType::get(Type::getInt8PtrTy(Ctx),
28-
Type::getInt32Ty(Ctx),
29-
false /*=isVarArg*/);
27+
FunctionType *FTy = FunctionType::get(
28+
Type::getInt8PtrTy(Ctx), Type::getInt32Ty(Ctx), false /*=isVarArg*/);
3029
F = Function::Create(FTy, Function::ExternalLinkage, "ba_func", M.get());
3130
F->setCallingConv(CallingConv::C);
3231

@@ -38,29 +37,25 @@ class LinkModuleTest : public testing::Test {
3837
ArrayType *AT = ArrayType::get(Type::getInt8PtrTy(Ctx), 3);
3938

4039
GV = new GlobalVariable(*M.get(), AT, false /*=isConstant*/,
41-
GlobalValue::InternalLinkage,
42-
0, "switch.bas");
43-
40+
GlobalValue::InternalLinkage, 0, "switch.bas");
4441

4542
// Global Initializer
46-
std::vector<Constant*> Init;
43+
std::vector<Constant *> Init;
4744
Constant *SwitchCase1BA = BlockAddress::get(SwitchCase1BB);
4845
Init.push_back(SwitchCase1BA);
4946

5047
Constant *SwitchCase2BA = BlockAddress::get(SwitchCase2BB);
5148
Init.push_back(SwitchCase2BA);
5249

5350
ConstantInt *One = ConstantInt::get(Type::getInt32Ty(Ctx), 1);
54-
Constant *OnePtr = ConstantExpr::getCast(Instruction::IntToPtr,
55-
One, Type::getInt8PtrTy(Ctx));
51+
Constant *OnePtr = ConstantExpr::getCast(Instruction::IntToPtr, One,
52+
Type::getInt8PtrTy(Ctx));
5653
Init.push_back(OnePtr);
5754

5855
GV->setInitializer(ConstantArray::get(AT, Init));
5956
}
6057

61-
virtual void TearDown() {
62-
M.reset();
63-
}
58+
virtual void TearDown() { M.reset(); }
6459

6560
OwningPtr<Module> M;
6661
Function *F;
@@ -75,7 +70,7 @@ TEST_F(LinkModuleTest, BlockAddress) {
7570
LLVMContext &Ctx = getGlobalContext();
7671
IRBuilder<> Builder(EntryBB);
7772

78-
std::vector<Value*> GEPIndices;
73+
std::vector<Value *> GEPIndices;
7974
GEPIndices.push_back(ConstantInt::get(Type::getInt32Ty(Ctx), 0));
8075
GEPIndices.push_back(F->arg_begin());
8176

@@ -117,7 +112,7 @@ TEST_F(LinkModuleTest, BlockAddress) {
117112
LinkedModule->getFunction("ba_func"));
118113
EXPECT_EQ(cast<BlockAddress>(Elem)->getBasicBlock()->getParent(),
119114
LinkedModule->getFunction("ba_func"));
120-
115+
121116
Elem = Init->getOperand(1);
122117
ASSERT_TRUE(isa<BlockAddress>(Elem));
123118
EXPECT_EQ(cast<BlockAddress>(Elem)->getFunction(),

0 commit comments

Comments
 (0)