mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Address code-review feedback for #33430
This commit is contained in:
@@ -129,7 +129,7 @@ public:
|
||||
ArrayRef<StringRef> buildCommandLine,
|
||||
ArrayRef<StringRef> extraPCMArgs,
|
||||
StringRef contextHash,
|
||||
bool isFramework = false
|
||||
bool isFramework
|
||||
) : ModuleDependenciesStorageBase(ModuleDependenciesKind::Swift,
|
||||
compiledModulePath),
|
||||
swiftInterfaceFile(swiftInterfaceFile),
|
||||
|
||||
@@ -112,7 +112,6 @@
|
||||
#include "swift/Frontend/ModuleInterfaceSupport.h"
|
||||
#include "swift/Serialization/SerializedModuleLoader.h"
|
||||
#include "llvm/Support/StringSaver.h"
|
||||
#include <sstream>
|
||||
|
||||
namespace clang {
|
||||
class CompilerInstance;
|
||||
@@ -263,8 +262,14 @@ private:
|
||||
} else if (key == "sourceInfoPath") {
|
||||
result.moduleSourceInfoPath = val.str();
|
||||
} else if (key == "isFramework") {
|
||||
std::istringstream is(val.str());
|
||||
is >> std::boolalpha >> result.isFramework;
|
||||
auto valStr = val.str();
|
||||
valStr.erase(std::remove(valStr.begin(), valStr.end(), '\n'), valStr.end());
|
||||
if (valStr.compare("true") == 0)
|
||||
result.isFramework = true;
|
||||
else if (valStr.compare("false") == 0)
|
||||
result.isFramework = false;
|
||||
else
|
||||
llvm_unreachable("Unexpected JSON value for isFramework");
|
||||
} else {
|
||||
// Being forgiving for future fields.
|
||||
continue;
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
import Foo
|
||||
|
||||
// This test is to verify autolinking behavior so it is macOS-specific.
|
||||
// REQUIRES OS=macosx
|
||||
// REQUIRES: OS=macosx
|
||||
|
||||
// RUN: otool -l %t/explicit-framework-irgen.o | %FileCheck %s
|
||||
// CHECK: cmd LC_LINKER_OPTION
|
||||
// CHECK-NEXT: cmdsize 32
|
||||
// CHECK-NEXT: count 2
|
||||
// CHECK-NEXT: cmdsize
|
||||
// CHECK-NEXT: count
|
||||
// CHECK-NEXT: string #1 -framework
|
||||
// CHECK-NEXT: string #2 Foo
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
// Check the contents of the JSON output
|
||||
// RUN: %FileCheck %s < %t/deps.json
|
||||
// REQUIRES: objc_interop
|
||||
// REQUIRES: OS=macosx
|
||||
|
||||
import CryptoKit
|
||||
|
||||
|
||||
Reference in New Issue
Block a user