<p dir="ltr">Looks good - thanks!</p>
<div class="gmail_quote">On Jun 14, 2015 1:21 PM,  <<a href="mailto:servuswiegehtz@yahoo.de">servuswiegehtz@yahoo.de</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Pete Abred <<a href="mailto:servuswiegehtz@yahoo.de">servuswiegehtz@yahoo.de</a>><br>
<br>
Adapt users of IRBuilder.CreateCall function with no function parameters<br>
to make use of the added default parameter value.<br>
<br>
---<br>
 lib/CodeGen/CGBuiltin.cpp       | 18 +++++++++---------<br>
 lib/CodeGen/CGClass.cpp         |  2 +-<br>
 lib/CodeGen/CGDecl.cpp          |  2 +-<br>
 lib/CodeGen/CGExpr.cpp          |  2 +-<br>
 lib/CodeGen/CGObjC.cpp          |  2 +-<br>
 lib/CodeGen/CGObjCRuntime.cpp   |  2 +-<br>
 lib/CodeGen/CodeGenFunction.cpp |  2 +-<br>
 lib/CodeGen/ItaniumCXXABI.cpp   |  8 ++++----<br>
 8 files changed, 19 insertions(+), 19 deletions(-)<br>
<br>
diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp<br>
index d86534d..d17629b 100644<br>
--- a/lib/CodeGen/CGBuiltin.cpp<br>
+++ b/lib/CodeGen/CGBuiltin.cpp<br>
@@ -489,7 +489,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,<br>
   }<br>
   case Builtin::BI__builtin_readcyclecounter: {<br>
     Value *F = CGM.getIntrinsic(Intrinsic::readcyclecounter);<br>
-    return RValue::get(Builder.CreateCall(F, {}));<br>
+    return RValue::get(Builder.CreateCall(F));<br>
   }<br>
   case Builtin::BI__builtin___clear_cache: {<br>
     Value *Begin = EmitScalarExpr(E->getArg(0));<br>
@@ -499,11 +499,11 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,<br>
   }<br>
   case Builtin::BI__builtin_trap: {<br>
     Value *F = CGM.getIntrinsic(Intrinsic::trap);<br>
-    return RValue::get(Builder.CreateCall(F, {}));<br>
+    return RValue::get(Builder.CreateCall(F));<br>
   }<br>
   case Builtin::BI__debugbreak: {<br>
     Value *F = CGM.getIntrinsic(Intrinsic::debugtrap);<br>
-    return RValue::get(Builder.CreateCall(F, {}));<br>
+    return RValue::get(Builder.CreateCall(F));<br>
   }<br>
   case Builtin::BI__builtin_unreachable: {<br>
     if (SanOpts.has(SanitizerKind::Unreachable)) {<br>
@@ -881,7 +881,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,<br>
   }<br>
   case Builtin::BI__builtin_unwind_init: {<br>
     Value *F = CGM.getIntrinsic(Intrinsic::eh_unwind_init);<br>
-    return RValue::get(Builder.CreateCall(F, {}));<br>
+    return RValue::get(Builder.CreateCall(F));<br>
   }<br>
   case Builtin::BI__builtin_extend_pointer: {<br>
     // Extends a pointer to the size of an _Unwind_Word, which is<br>
@@ -920,7 +920,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,<br>
<br>
     // Store the stack pointer to the setjmp buffer.<br>
     Value *StackAddr =<br>
-        Builder.CreateCall(CGM.getIntrinsic(Intrinsic::stacksave), {});<br>
+        Builder.CreateCall(CGM.getIntrinsic(Intrinsic::stacksave));<br>
     Value *StackSaveSlot =<br>
       Builder.CreateGEP(Buf, ConstantInt::get(Int32Ty, 2));<br>
     Builder.CreateStore(StackAddr, StackSaveSlot);<br>
@@ -3301,7 +3301,7 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID,<br>
                 : InlineAsm::get(FTy, ".inst 0x" + utohexstr(ZExtValue), "",<br>
                                  /*SideEffects=*/true);<br>
<br>
-    return Builder.CreateCall(Emit, {});<br>
+    return Builder.CreateCall(Emit);<br>
   }<br>
<br>
   if (BuiltinID == ARM::BI__builtin_arm_dbg) {<br>
@@ -3445,7 +3445,7 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID,<br>
<br>
   if (BuiltinID == ARM::BI__builtin_arm_clrex) {<br>
     Function *F = CGM.getIntrinsic(Intrinsic::arm_clrex);<br>
-    return Builder.CreateCall(F, {});<br>
+    return Builder.CreateCall(F);<br>
   }<br>
<br>
   // CRC32<br>
@@ -4204,7 +4204,7 @@ Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID,<br>
<br>
   if (BuiltinID == AArch64::BI__builtin_arm_clrex) {<br>
     Function *F = CGM.getIntrinsic(Intrinsic::aarch64_clrex);<br>
-    return Builder.CreateCall(F, {});<br>
+    return Builder.CreateCall(F);<br>
   }<br>
<br>
   // CRC32<br>
@@ -6133,7 +6133,7 @@ Value *CodeGenFunction::EmitX86BuiltinExpr(unsigned BuiltinID,<br>
       break;<br>
     }<br>
<br>
-    Value *Call = Builder.CreateCall(CGM.getIntrinsic(ID), {});<br>
+    Value *Call = Builder.CreateCall(CGM.getIntrinsic(ID));<br>
     Builder.CreateStore(Builder.CreateExtractValue(Call, 0), Ops[0]);<br>
     return Builder.CreateExtractValue(Call, 1);<br>
   }<br>
diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp<br>
index cd75da2..a048a11 100644<br>
--- a/lib/CodeGen/CGClass.cpp<br>
+++ b/lib/CodeGen/CGClass.cpp<br>
@@ -2215,7 +2215,7 @@ void CodeGenFunction::EmitVTablePtrCheck(const CXXRecordDecl *RD,<br>
   Builder.CreateCondBr(BitSetTest, ContBlock, TrapBlock);<br>
<br>
   EmitBlock(TrapBlock);<br>
-  Builder.CreateCall(CGM.getIntrinsic(llvm::Intrinsic::trap), {});<br>
+  Builder.CreateCall(CGM.getIntrinsic(llvm::Intrinsic::trap));<br>
   Builder.CreateUnreachable();<br>
<br>
   EmitBlock(ContBlock);<br>
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp<br>
index 579a041..fdbf1f6 100644<br>
--- a/lib/CodeGen/CGDecl.cpp<br>
+++ b/lib/CodeGen/CGDecl.cpp<br>
@@ -990,7 +990,7 @@ CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) {<br>
       llvm::Value *Stack = CreateTempAlloca(Int8PtrTy, "saved_stack");<br>
<br>
       llvm::Value *F = CGM.getIntrinsic(llvm::Intrinsic::stacksave);<br>
-      llvm::Value *V = Builder.CreateCall(F, {});<br>
+      llvm::Value *V = Builder.CreateCall(F);<br>
<br>
       Builder.CreateStore(V, Stack);<br>
<br>
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp<br>
index 1ed45a3..9d93cc0 100644<br>
--- a/lib/CodeGen/CGExpr.cpp<br>
+++ b/lib/CodeGen/CGExpr.cpp<br>
@@ -2404,7 +2404,7 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked) {<br>
     Builder.CreateCondBr(Checked, Cont, TrapBB);<br>
     EmitBlock(TrapBB);<br>
     llvm::Value *F = CGM.getIntrinsic(llvm::Intrinsic::trap);<br>
-    llvm::CallInst *TrapCall = Builder.CreateCall(F, {});<br>
+    llvm::CallInst *TrapCall = Builder.CreateCall(F);<br>
     TrapCall->setDoesNotReturn();<br>
     TrapCall->setDoesNotThrow();<br>
     Builder.CreateUnreachable();<br>
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp<br>
index ef9a92d..d9270ad 100644<br>
--- a/lib/CodeGen/CGObjC.cpp<br>
+++ b/lib/CodeGen/CGObjC.cpp<br>
@@ -1981,7 +1981,7 @@ CodeGenFunction::EmitARCRetainAutoreleasedReturnValue(llvm::Value *value) {<br>
<br>
   // Call the marker asm if we made one, which we do only at -O0.<br>
   if (marker)<br>
-    Builder.CreateCall(marker, {});<br>
+    Builder.CreateCall(marker);<br>
<br>
   return emitARCValueOperation(*this, value,<br>
                      CGM.getARCEntrypoints().objc_retainAutoreleasedReturnValue,<br>
diff --git a/lib/CodeGen/CGObjCRuntime.cpp b/lib/CodeGen/CGObjCRuntime.cpp<br>
index 5290a87..3d013da 100644<br>
--- a/lib/CodeGen/CGObjCRuntime.cpp<br>
+++ b/lib/CodeGen/CGObjCRuntime.cpp<br>
@@ -160,7 +160,7 @@ namespace {<br>
<br>
     void Emit(CodeGenFunction &CGF, Flags flags) override {<br>
       if (!MightThrow) {<br>
-        CGF.Builder.CreateCall(Fn, {})->setDoesNotThrow();<br>
+        CGF.Builder.CreateCall(Fn)->setDoesNotThrow();<br>
         return;<br>
       }<br>
<br>
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp<br>
index 01da750..3c5bc1c 100644<br>
--- a/lib/CodeGen/CodeGenFunction.cpp<br>
+++ b/lib/CodeGen/CodeGenFunction.cpp<br>
@@ -929,7 +929,7 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn,<br>
                 "missing_return", EmitCheckSourceLocation(FD->getLocation()),<br>
                 None);<br>
     } else if (CGM.getCodeGenOpts().OptimizationLevel == 0)<br>
-      Builder.CreateCall(CGM.getIntrinsic(llvm::Intrinsic::trap), {});<br>
+      Builder.CreateCall(CGM.getIntrinsic(llvm::Intrinsic::trap));<br>
     Builder.CreateUnreachable();<br>
     Builder.ClearInsertionPoint();<br>
   }<br>
diff --git a/lib/CodeGen/ItaniumCXXABI.cpp b/lib/CodeGen/ItaniumCXXABI.cpp<br>
index 0a1a4ce..e8c28c1 100644<br>
--- a/lib/CodeGen/ItaniumCXXABI.cpp<br>
+++ b/lib/CodeGen/ItaniumCXXABI.cpp<br>
@@ -2090,7 +2090,7 @@ void ItaniumCXXABI::EmitThreadLocalInitFuncs(<br>
     CGBuilderTy Builder(Entry);<br>
     if (InitIsInitFunc) {<br>
       if (Init)<br>
-        Builder.CreateCall(Init, {});<br>
+        Builder.CreateCall(Init);<br>
     } else {<br>
       // Don't know whether we have an init function. Call it if it exists.<br>
       llvm::Value *Have = Builder.CreateIsNotNull(Init);<br>
@@ -2099,7 +2099,7 @@ void ItaniumCXXABI::EmitThreadLocalInitFuncs(<br>
       Builder.CreateCondBr(Have, InitBB, ExitBB);<br>
<br>
       Builder.SetInsertPoint(InitBB);<br>
-      Builder.CreateCall(Init, {});<br>
+      Builder.CreateCall(Init);<br>
       Builder.CreateBr(ExitBB);<br>
<br>
       Builder.SetInsertPoint(ExitBB);<br>
@@ -2128,7 +2128,7 @@ LValue ItaniumCXXABI::EmitThreadLocalVarDeclLValue(CodeGenFunction &CGF,<br>
   llvm::Value *Val = CGF.CGM.GetAddrOfGlobalVar(VD, Ty);<br>
   llvm::Function *Wrapper = getOrCreateThreadLocalWrapper(VD, Val);<br>
<br>
-  Val = CGF.Builder.CreateCall(Wrapper, {});<br>
+  Val = CGF.Builder.CreateCall(Wrapper);<br>
<br>
   LValue LV;<br>
   if (VD->getType()->isReferenceType())<br>
@@ -3615,7 +3615,7 @@ static llvm::Constant *getClangCallTerminateFn(CodeGenModule &CGM) {<br>
     catchCall->setCallingConv(CGM.getRuntimeCC());<br>
<br>
     // Call std::terminate().<br>
-    llvm::CallInst *termCall = builder.CreateCall(CGM.getTerminateFn(), {});<br>
+    llvm::CallInst *termCall = builder.CreateCall(CGM.getTerminateFn());<br>
     termCall->setDoesNotThrow();<br>
     termCall->setDoesNotReturn();<br>
     termCall->setCallingConv(CGM.getRuntimeCC());<br>
--<br>
2.4.2<br>
<br>
</blockquote></div>