@@ -2648,44 +2648,44 @@ static uint32_t getAndFeatures() {
2648
2648
return ret;
2649
2649
}
2650
2650
2651
- static void getAarch64PauthInfo () {
2651
+ static void getAArch64PauthInfo () {
2652
2652
if (ctx.objectFiles .empty ())
2653
2653
return ;
2654
2654
2655
- auto NonEmptyIt = std::find_if (
2655
+ auto it = std::find_if (
2656
2656
ctx.objectFiles .begin (), ctx.objectFiles .end (),
2657
2657
[](const ELFFileBase *f) { return !f->aarch64PauthAbiTag .empty (); });
2658
- if (NonEmptyIt == ctx.objectFiles .end ())
2658
+ if (it == ctx.objectFiles .end ())
2659
2659
return ;
2660
2660
2661
- ctx.aarch64PauthAbiTag = (*NonEmptyIt )->aarch64PauthAbiTag ;
2662
- StringRef F1 = (*NonEmptyIt )->getName ();
2663
- for (ELFFileBase *F : ArrayRef (ctx.objectFiles )) {
2664
- StringRef F2 = F ->getName ();
2665
- const SmallVector<uint8_t , 0 > &D1 = ctx.aarch64PauthAbiTag ;
2666
- const SmallVector<uint8_t , 0 > &D2 = F ->aarch64PauthAbiTag ;
2667
- if (D1 .empty () != D2 .empty ()) {
2668
- auto Helper = [](StringRef Report , const Twine &Msg ) {
2669
- if (Report == " warning" )
2670
- warn (Msg );
2671
- else if (Report == " error" )
2672
- error (Msg );
2661
+ ctx.aarch64PauthAbiTag = (*it )->aarch64PauthAbiTag ;
2662
+ StringRef f1 = (*it )->getName ();
2663
+ for (ELFFileBase *f : ArrayRef (ctx.objectFiles )) {
2664
+ StringRef f2 = f ->getName ();
2665
+ const SmallVector<uint8_t , 0 > &d1 = ctx.aarch64PauthAbiTag ;
2666
+ const SmallVector<uint8_t , 0 > &d2 = f ->aarch64PauthAbiTag ;
2667
+ if (d1 .empty () != d2 .empty ()) {
2668
+ auto helper = [](StringRef report , const Twine &msg ) {
2669
+ if (report == " warning" )
2670
+ warn (msg );
2671
+ else if (report == " error" )
2672
+ error (msg );
2673
2673
};
2674
2674
2675
- Helper (config->zPauthReport ,
2676
- (D1 .empty () ? F1 .str () : F2 .str ()) +
2675
+ helper (config->zPauthReport ,
2676
+ (d1 .empty () ? f1 .str () : f2 .str ()) +
2677
2677
" has no AArch64 PAuth compatibility info while " +
2678
- (D1 .empty () ? F2 .str () : F1 .str ()) +
2678
+ (d1 .empty () ? f2 .str () : f1 .str ()) +
2679
2679
" has one; either all or no input files must have it" );
2680
2680
}
2681
2681
2682
- if (!D1 .empty () && !D2 .empty () &&
2683
- !std::equal (D1 .begin (), D1 .end (), D2 .begin (), D2 .end ()))
2682
+ if (!d1 .empty () && !d2 .empty () &&
2683
+ !std::equal (d1 .begin (), d1 .end (), d2 .begin (), d2 .end ()))
2684
2684
errorOrWarn (
2685
2685
" incompatible values of AArch64 PAuth compatibility info found"
2686
2686
" \n " +
2687
- F1 + " : 0x" + toHex (ArrayRef (D1 .data (), D1 .size ())) + " \n " + F2 +
2688
- " : 0x" + toHex (ArrayRef (D2 .data (), D2 .size ())));
2687
+ f1 + " : 0x" + toHex (ArrayRef (d1 .data (), d1 .size ())) + " \n " + f2 +
2688
+ " : 0x" + toHex (ArrayRef (d2 .data (), d2 .size ())));
2689
2689
}
2690
2690
}
2691
2691
@@ -3027,7 +3027,7 @@ void LinkerDriver::link(opt::InputArgList &args) {
3027
3027
config->andFeatures = getAndFeatures ();
3028
3028
3029
3029
if (config->emachine == EM_AARCH64)
3030
- getAarch64PauthInfo ();
3030
+ getAArch64PauthInfo ();
3031
3031
3032
3032
// The Target instance handles target-specific stuff, such as applying
3033
3033
// relocations or writing a PLT section. It also contains target-dependent
0 commit comments