@@ -71,7 +71,7 @@ int32_t AsyncInfoTy::runPostProcessing() {
71
71
72
72
// Clear the vector up until the last known function, since post-processing
73
73
// procedures might add new procedures themselves.
74
- const auto PrevBegin = PostProcessingFunctions.begin ();
74
+ const auto * PrevBegin = PostProcessingFunctions.begin ();
75
75
PostProcessingFunctions.erase (PrevBegin, PrevBegin + Size);
76
76
77
77
return OFFLOAD_SUCCESS;
@@ -297,8 +297,8 @@ void handleTargetOutcome(bool Success, ident_t *Loc) {
297
297
if (PM->RTLs .UsedRTLs .empty ()) {
298
298
llvm::SmallVector<llvm::StringRef> Archs;
299
299
llvm::transform (PM->Images , std::back_inserter (Archs),
300
- [](const auto &x ) {
301
- return !x .second .Arch ? " empty" : x .second .Arch ;
300
+ [](const auto &X ) {
301
+ return !X .second .Arch ? " empty" : X .second .Arch ;
302
302
});
303
303
FAILURE_MESSAGE (
304
304
" No images found compatible with the installed hardware. " );
@@ -473,7 +473,7 @@ void *targetLockExplicit(void *HostPtr, size_t Size, int DeviceNum,
473
473
return NULL ;
474
474
}
475
475
476
- void *rc = NULL ;
476
+ void *RC = NULL ;
477
477
478
478
if (!deviceIsReady (DeviceNum)) {
479
479
DP (" %s returns NULL ptr\n " , Name);
@@ -492,16 +492,16 @@ void *targetLockExplicit(void *HostPtr, size_t Size, int DeviceNum,
492
492
DevicePtr = PM->Devices [DeviceNum].get ();
493
493
}
494
494
495
- int32_t err = 0 ;
495
+ int32_t Err = 0 ;
496
496
if (DevicePtr->RTL ->data_lock ) {
497
- err = DevicePtr->RTL ->data_lock (DeviceNum, HostPtr, Size, &rc );
498
- if (err ) {
497
+ Err = DevicePtr->RTL ->data_lock (DeviceNum, HostPtr, Size, &RC );
498
+ if (Err ) {
499
499
DP (" Could not lock ptr %p\n " , HostPtr);
500
500
return nullptr ;
501
501
}
502
502
}
503
- DP (" %s returns device ptr " DPxMOD " \n " , Name, DPxPTR (rc ));
504
- return rc ;
503
+ DP (" %s returns device ptr " DPxMOD " \n " , Name, DPxPTR (RC ));
504
+ return RC ;
505
505
}
506
506
507
507
void targetUnlockExplicit (void *HostPtr, int DeviceNum, const char *Name) {
@@ -1264,7 +1264,7 @@ class PrivateArgumentManagerTy {
1264
1264
1265
1265
FirstPrivateArgInfoTy (int Index, void *HstPtr, uint32_t Size,
1266
1266
uint32_t Alignment, uint32_t Padding,
1267
- const map_var_info_t HstPtrName = nullptr )
1267
+ map_var_info_t HstPtrName = nullptr )
1268
1268
: HstPtrBegin(reinterpret_cast <char *>(HstPtr)),
1269
1269
HstPtrEnd (HstPtrBegin + Size), Index(Index), Alignment(Alignment),
1270
1270
Size(Size), Padding(Padding), HstPtrName(HstPtrName) {}
@@ -1298,7 +1298,7 @@ class PrivateArgumentManagerTy {
1298
1298
// / Add a private argument
1299
1299
int addArg (void *HstPtr, int64_t ArgSize, int64_t ArgOffset,
1300
1300
bool IsFirstPrivate, void *&TgtPtr, int TgtArgsIndex,
1301
- const map_var_info_t HstPtrName = nullptr ,
1301
+ map_var_info_t HstPtrName = nullptr ,
1302
1302
const bool AllocImmediately = false ) {
1303
1303
// If the argument is not first-private, or its size is greater than a
1304
1304
// predefined threshold, we will allocate memory and issue the transfer
@@ -1385,7 +1385,7 @@ class PrivateArgumentManagerTy {
1385
1385
assert (FirstPrivateArgSize != 0 &&
1386
1386
" FirstPrivateArgSize is 0 but FirstPrivateArgInfo is empty" );
1387
1387
FirstPrivateArgBuffer.resize (FirstPrivateArgSize, 0 );
1388
- auto Itr = FirstPrivateArgBuffer.begin ();
1388
+ auto * Itr = FirstPrivateArgBuffer.begin ();
1389
1389
// Copy all host data to this buffer
1390
1390
for (FirstPrivateArgInfoTy &Info : FirstPrivateArgInfo) {
1391
1391
// First pad the pointer as we (have to) pad it on the device too.
@@ -1725,10 +1725,10 @@ int target(ident_t *Loc, DeviceTy &Device, void *HostPtr,
1725
1725
// / and informing the record-replayer of whether to store the output
1726
1726
// / in some file.
1727
1727
int target_activate_rr (DeviceTy &Device, uint64_t MemorySize, void *VAddr,
1728
- bool isRecord , bool SaveOutput,
1728
+ bool IsRecord , bool SaveOutput,
1729
1729
uint64_t &ReqPtrArgOffset) {
1730
1730
return Device.RTL ->activate_record_replay (Device.DeviceID , MemorySize, VAddr,
1731
- isRecord , SaveOutput,
1731
+ IsRecord , SaveOutput,
1732
1732
ReqPtrArgOffset);
1733
1733
}
1734
1734
0 commit comments