@@ -66,7 +66,7 @@ LLVMRustCreateMemoryBufferWithContentsOfFile(const char *Path) {
6666
6767extern " C" char *LLVMRustGetLastError (void ) {
6868 char *ret = LastError;
69- LastError = NULL ;
69+ LastError = nullptr ;
7070 return ret;
7171}
7272
@@ -319,7 +319,7 @@ inline Metadata **unwrap(LLVMRustMetadataRef *Vals) {
319319}
320320
321321template <typename DIT> DIT *unwrapDIptr (LLVMRustMetadataRef ref) {
322- return (DIT *)(ref ? unwrap<MDNode>(ref) : NULL );
322+ return (DIT *)(ref ? unwrap<MDNode>(ref) : nullptr );
323323}
324324
325325#define DIDescriptor DIScope
@@ -574,7 +574,7 @@ extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateStaticVariable(
574574 LLVMRustDIBuilderRef Builder, LLVMRustMetadataRef Context, const char *Name,
575575 const char *LinkageName, LLVMRustMetadataRef File, unsigned LineNo,
576576 LLVMRustMetadataRef Ty, bool isLocalToUnit, LLVMValueRef Val,
577- LLVMRustMetadataRef Decl = NULL , uint64_t AlignInBits = 0 ) {
577+ LLVMRustMetadataRef Decl = nullptr , uint64_t AlignInBits = 0 ) {
578578 Constant *InitVal = cast<Constant>(unwrap (Val));
579579
580580#if LLVM_VERSION_GE(4, 0)
@@ -1012,14 +1012,14 @@ extern "C" LLVMValueRef LLVMRustBuildCleanupPad(LLVMBuilderRef Builder,
10121012 const char *Name) {
10131013#if LLVM_VERSION_GE(3, 8)
10141014 Value **Args = unwrap (LLArgs);
1015- if (ParentPad == NULL ) {
1015+ if (ParentPad == nullptr ) {
10161016 Type *Ty = Type::getTokenTy (unwrap (Builder)->getContext ());
10171017 ParentPad = wrap (Constant::getNullValue (Ty));
10181018 }
10191019 return wrap (unwrap (Builder)->CreateCleanupPad (
10201020 unwrap (ParentPad), ArrayRef<Value *>(Args, ArgCnt), Name));
10211021#else
1022- return NULL ;
1022+ return nullptr ;
10231023#endif
10241024}
10251025
@@ -1030,7 +1030,7 @@ extern "C" LLVMValueRef LLVMRustBuildCleanupRet(LLVMBuilderRef Builder,
10301030 CleanupPadInst *Inst = cast<CleanupPadInst>(unwrap (CleanupPad));
10311031 return wrap (unwrap (Builder)->CreateCleanupRet (Inst, unwrap (UnwindBB)));
10321032#else
1033- return NULL ;
1033+ return nullptr ;
10341034#endif
10351035}
10361036
@@ -1042,7 +1042,7 @@ LLVMRustBuildCatchPad(LLVMBuilderRef Builder, LLVMValueRef ParentPad,
10421042 return wrap (unwrap (Builder)->CreateCatchPad (
10431043 unwrap (ParentPad), ArrayRef<Value *>(Args, ArgCnt), Name));
10441044#else
1045- return NULL ;
1045+ return nullptr ;
10461046#endif
10471047}
10481048
@@ -1053,7 +1053,7 @@ extern "C" LLVMValueRef LLVMRustBuildCatchRet(LLVMBuilderRef Builder,
10531053 return wrap (unwrap (Builder)->CreateCatchRet (cast<CatchPadInst>(unwrap (Pad)),
10541054 unwrap (BB)));
10551055#else
1056- return NULL ;
1056+ return nullptr ;
10571057#endif
10581058}
10591059
@@ -1063,14 +1063,14 @@ extern "C" LLVMValueRef LLVMRustBuildCatchSwitch(LLVMBuilderRef Builder,
10631063 unsigned NumHandlers,
10641064 const char *Name) {
10651065#if LLVM_VERSION_GE(3, 8)
1066- if (ParentPad == NULL ) {
1066+ if (ParentPad == nullptr ) {
10671067 Type *Ty = Type::getTokenTy (unwrap (Builder)->getContext ());
10681068 ParentPad = wrap (Constant::getNullValue (Ty));
10691069 }
10701070 return wrap (unwrap (Builder)->CreateCatchSwitch (unwrap (ParentPad), unwrap (BB),
10711071 NumHandlers, Name));
10721072#else
1073- return NULL ;
1073+ return nullptr ;
10741074#endif
10751075}
10761076
@@ -1126,7 +1126,7 @@ LLVMRustBuildInvoke(LLVMBuilderRef B, LLVMValueRef Fn, LLVMValueRef *Args,
11261126extern " C" void *LLVMRustBuildOperandBundleDef (const char *Name,
11271127 LLVMValueRef *Inputs,
11281128 unsigned NumInputs) {
1129- return NULL ;
1129+ return nullptr ;
11301130}
11311131
11321132extern " C" void LLVMRustFreeOperandBundleDef (void *Bundle) {}
0 commit comments