@@ -342,8 +342,8 @@ void LinkerDriver::enqueueArchiveMember(const Archive::Child &c,
342
342
CHECK (c.getFullName (),
343
343
" could not get the filename for the member defining symbol " +
344
344
toCOFFString (ctx, sym));
345
- auto future = std::make_shared<std::future<MBErrPair>>(
346
- createFutureForFile (childName));
345
+ auto future =
346
+ std::make_shared<std::future<MBErrPair>>( createFutureForFile (childName));
347
347
enqueueTask ([=]() {
348
348
auto mbOrErr = future->get ();
349
349
if (mbOrErr.second )
@@ -640,26 +640,28 @@ void LinkerDriver::detectWinSysRoot(const opt::InputArgList &Args) {
640
640
void LinkerDriver::addClangLibSearchPaths (const std::string &argv0) {
641
641
std::string lldBinary = sys::fs::getMainExecutable (argv0.c_str (), nullptr );
642
642
SmallString<128 > binDir (lldBinary);
643
- sys::path::remove_filename (binDir); // remove lld-link.exe
643
+ sys::path::remove_filename (binDir); // remove lld-link.exe
644
644
StringRef rootDir = sys::path::parent_path (binDir); // remove 'bin'
645
645
646
646
SmallString<128 > libDir (rootDir);
647
647
sys::path::append (libDir, " lib" );
648
648
// We need to prepend the paths here in order to make sure that we always
649
- // try to link the clang versions of the builtins over the ones supplied by MSVC.
649
+ // try to link the clang versions of the builtins over the ones supplied by
650
+ // MSVC.
650
651
searchPaths.insert (searchPaths.begin (), saver ().save (libDir.str ()));
651
652
652
653
// Add the resource dir library path
653
654
SmallString<128 > runtimeLibDir (rootDir);
654
- sys::path::append (runtimeLibDir, " lib" , " clang" , std::to_string (LLVM_VERSION_MAJOR), " lib" );
655
+ sys::path::append (runtimeLibDir, " lib" , " clang" ,
656
+ std::to_string (LLVM_VERSION_MAJOR), " lib" );
655
657
searchPaths.insert (searchPaths.begin (), saver ().save (runtimeLibDir.str ()));
656
658
657
659
// Resource dir + osname, which is hardcoded to windows since we are in the
658
660
// COFF driver.
659
661
SmallString<128 > runtimeLibDirWithOS (runtimeLibDir);
660
662
sys::path::append (runtimeLibDirWithOS, " windows" );
661
- searchPaths.insert (searchPaths.begin (), saver (). save (runtimeLibDirWithOS. str ()));
662
-
663
+ searchPaths.insert (searchPaths.begin (),
664
+ saver (). save (runtimeLibDirWithOS. str ()));
663
665
}
664
666
665
667
void LinkerDriver::addWinSysRootLibSearchPaths () {
@@ -1145,8 +1147,7 @@ void LinkerDriver::parseOrderFile(StringRef arg) {
1145
1147
if (set.count (s) == 0 ) {
1146
1148
if (ctx.config .warnMissingOrderSymbol )
1147
1149
warn (" /order:" + arg + " : missing symbol: " + s + " [LNK4037]" );
1148
- }
1149
- else
1150
+ } else
1150
1151
ctx.config .order [s] = INT_MIN + ctx.config .order .size ();
1151
1152
}
1152
1153
@@ -1313,8 +1314,8 @@ void LinkerDriver::parsePDBAltPath() {
1313
1314
else if (var.equals_insensitive (" %_ext%" ))
1314
1315
buf.append (binaryExtension);
1315
1316
else {
1316
- warn (" only %_PDB% and %_EXT% supported in /pdbaltpath:, keeping " +
1317
- var + " as literal" );
1317
+ warn (" only %_PDB% and %_EXT% supported in /pdbaltpath:, keeping " + var +
1318
+ " as literal" );
1318
1319
buf.append (var);
1319
1320
}
1320
1321
@@ -1448,8 +1449,8 @@ getVFS(const opt::InputArgList &args) {
1448
1449
return nullptr ;
1449
1450
}
1450
1451
1451
- if (auto ret = vfs::getVFSFromYAML (std::move (*bufOrErr), /* DiagHandler */ nullptr ,
1452
- arg->getValue ()))
1452
+ if (auto ret = vfs::getVFSFromYAML (std::move (*bufOrErr),
1453
+ /* DiagHandler */ nullptr , arg->getValue ()))
1453
1454
return ret;
1454
1455
1455
1456
error (" Invalid vfs overlay" );
@@ -2101,7 +2102,7 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
2101
2102
// Handle /RELEASE
2102
2103
if (args.hasArg (OPT_release))
2103
2104
config->writeCheckSum = true ;
2104
-
2105
+
2105
2106
// Handle /safeseh, x86 only, on by default, except for mingw.
2106
2107
if (config->machine == I386) {
2107
2108
config->safeSEH = args.hasFlag (OPT_safeseh, OPT_safeseh_no, !config->mingw );
@@ -2342,7 +2343,8 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
2342
2343
std::vector<WrappedSymbol> wrapped = addWrappedSymbols (ctx, args);
2343
2344
// Load more object files that might be needed for wrapped symbols.
2344
2345
if (!wrapped.empty ())
2345
- while (run ());
2346
+ while (run ())
2347
+ ;
2346
2348
2347
2349
if (config->autoImport || config->stdcallFixup ) {
2348
2350
// MinGW specific.
0 commit comments