@@ -66,7 +66,7 @@ LLVMRustCreateMemoryBufferWithContentsOfFile(const char *Path) {
66
66
67
67
extern " C" char *LLVMRustGetLastError (void ) {
68
68
char *ret = LastError;
69
- LastError = NULL ;
69
+ LastError = nullptr ;
70
70
return ret;
71
71
}
72
72
@@ -319,7 +319,7 @@ inline Metadata **unwrap(LLVMRustMetadataRef *Vals) {
319
319
}
320
320
321
321
template <typename DIT> DIT *unwrapDIptr (LLVMRustMetadataRef ref) {
322
- return (DIT *)(ref ? unwrap<MDNode>(ref) : NULL );
322
+ return (DIT *)(ref ? unwrap<MDNode>(ref) : nullptr );
323
323
}
324
324
325
325
#define DIDescriptor DIScope
@@ -574,7 +574,7 @@ extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateStaticVariable(
574
574
LLVMRustDIBuilderRef Builder, LLVMRustMetadataRef Context, const char *Name,
575
575
const char *LinkageName, LLVMRustMetadataRef File, unsigned LineNo,
576
576
LLVMRustMetadataRef Ty, bool isLocalToUnit, LLVMValueRef Val,
577
- LLVMRustMetadataRef Decl = NULL , uint64_t AlignInBits = 0 ) {
577
+ LLVMRustMetadataRef Decl = nullptr , uint64_t AlignInBits = 0 ) {
578
578
Constant *InitVal = cast<Constant>(unwrap (Val));
579
579
580
580
#if LLVM_VERSION_GE(4, 0)
@@ -1012,14 +1012,14 @@ extern "C" LLVMValueRef LLVMRustBuildCleanupPad(LLVMBuilderRef Builder,
1012
1012
const char *Name) {
1013
1013
#if LLVM_VERSION_GE(3, 8)
1014
1014
Value **Args = unwrap (LLArgs);
1015
- if (ParentPad == NULL ) {
1015
+ if (ParentPad == nullptr ) {
1016
1016
Type *Ty = Type::getTokenTy (unwrap (Builder)->getContext ());
1017
1017
ParentPad = wrap (Constant::getNullValue (Ty));
1018
1018
}
1019
1019
return wrap (unwrap (Builder)->CreateCleanupPad (
1020
1020
unwrap (ParentPad), ArrayRef<Value *>(Args, ArgCnt), Name));
1021
1021
#else
1022
- return NULL ;
1022
+ return nullptr ;
1023
1023
#endif
1024
1024
}
1025
1025
@@ -1030,7 +1030,7 @@ extern "C" LLVMValueRef LLVMRustBuildCleanupRet(LLVMBuilderRef Builder,
1030
1030
CleanupPadInst *Inst = cast<CleanupPadInst>(unwrap (CleanupPad));
1031
1031
return wrap (unwrap (Builder)->CreateCleanupRet (Inst, unwrap (UnwindBB)));
1032
1032
#else
1033
- return NULL ;
1033
+ return nullptr ;
1034
1034
#endif
1035
1035
}
1036
1036
@@ -1042,7 +1042,7 @@ LLVMRustBuildCatchPad(LLVMBuilderRef Builder, LLVMValueRef ParentPad,
1042
1042
return wrap (unwrap (Builder)->CreateCatchPad (
1043
1043
unwrap (ParentPad), ArrayRef<Value *>(Args, ArgCnt), Name));
1044
1044
#else
1045
- return NULL ;
1045
+ return nullptr ;
1046
1046
#endif
1047
1047
}
1048
1048
@@ -1053,7 +1053,7 @@ extern "C" LLVMValueRef LLVMRustBuildCatchRet(LLVMBuilderRef Builder,
1053
1053
return wrap (unwrap (Builder)->CreateCatchRet (cast<CatchPadInst>(unwrap (Pad)),
1054
1054
unwrap (BB)));
1055
1055
#else
1056
- return NULL ;
1056
+ return nullptr ;
1057
1057
#endif
1058
1058
}
1059
1059
@@ -1063,14 +1063,14 @@ extern "C" LLVMValueRef LLVMRustBuildCatchSwitch(LLVMBuilderRef Builder,
1063
1063
unsigned NumHandlers,
1064
1064
const char *Name) {
1065
1065
#if LLVM_VERSION_GE(3, 8)
1066
- if (ParentPad == NULL ) {
1066
+ if (ParentPad == nullptr ) {
1067
1067
Type *Ty = Type::getTokenTy (unwrap (Builder)->getContext ());
1068
1068
ParentPad = wrap (Constant::getNullValue (Ty));
1069
1069
}
1070
1070
return wrap (unwrap (Builder)->CreateCatchSwitch (unwrap (ParentPad), unwrap (BB),
1071
1071
NumHandlers, Name));
1072
1072
#else
1073
- return NULL ;
1073
+ return nullptr ;
1074
1074
#endif
1075
1075
}
1076
1076
@@ -1126,7 +1126,7 @@ LLVMRustBuildInvoke(LLVMBuilderRef B, LLVMValueRef Fn, LLVMValueRef *Args,
1126
1126
extern " C" void *LLVMRustBuildOperandBundleDef (const char *Name,
1127
1127
LLVMValueRef *Inputs,
1128
1128
unsigned NumInputs) {
1129
- return NULL ;
1129
+ return nullptr ;
1130
1130
}
1131
1131
1132
1132
extern " C" void LLVMRustFreeOperandBundleDef (void *Bundle) {}
0 commit comments