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> buildCommandLine,
|
||||||
ArrayRef<StringRef> extraPCMArgs,
|
ArrayRef<StringRef> extraPCMArgs,
|
||||||
StringRef contextHash,
|
StringRef contextHash,
|
||||||
bool isFramework = false
|
bool isFramework
|
||||||
) : ModuleDependenciesStorageBase(ModuleDependenciesKind::Swift,
|
) : ModuleDependenciesStorageBase(ModuleDependenciesKind::Swift,
|
||||||
compiledModulePath),
|
compiledModulePath),
|
||||||
swiftInterfaceFile(swiftInterfaceFile),
|
swiftInterfaceFile(swiftInterfaceFile),
|
||||||
|
|||||||
@@ -112,7 +112,6 @@
|
|||||||
#include "swift/Frontend/ModuleInterfaceSupport.h"
|
#include "swift/Frontend/ModuleInterfaceSupport.h"
|
||||||
#include "swift/Serialization/SerializedModuleLoader.h"
|
#include "swift/Serialization/SerializedModuleLoader.h"
|
||||||
#include "llvm/Support/StringSaver.h"
|
#include "llvm/Support/StringSaver.h"
|
||||||
#include <sstream>
|
|
||||||
|
|
||||||
namespace clang {
|
namespace clang {
|
||||||
class CompilerInstance;
|
class CompilerInstance;
|
||||||
@@ -263,8 +262,14 @@ private:
|
|||||||
} else if (key == "sourceInfoPath") {
|
} else if (key == "sourceInfoPath") {
|
||||||
result.moduleSourceInfoPath = val.str();
|
result.moduleSourceInfoPath = val.str();
|
||||||
} else if (key == "isFramework") {
|
} else if (key == "isFramework") {
|
||||||
std::istringstream is(val.str());
|
auto valStr = val.str();
|
||||||
is >> std::boolalpha >> result.isFramework;
|
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 {
|
} else {
|
||||||
// Being forgiving for future fields.
|
// Being forgiving for future fields.
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -27,11 +27,11 @@
|
|||||||
import Foo
|
import Foo
|
||||||
|
|
||||||
// This test is to verify autolinking behavior so it is macOS-specific.
|
// 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
|
// RUN: otool -l %t/explicit-framework-irgen.o | %FileCheck %s
|
||||||
// CHECK: cmd LC_LINKER_OPTION
|
// CHECK: cmd LC_LINKER_OPTION
|
||||||
// CHECK-NEXT: cmdsize 32
|
// CHECK-NEXT: cmdsize
|
||||||
// CHECK-NEXT: count 2
|
// CHECK-NEXT: count
|
||||||
// CHECK-NEXT: string #1 -framework
|
// CHECK-NEXT: string #1 -framework
|
||||||
// CHECK-NEXT: string #2 Foo
|
// CHECK-NEXT: string #2 Foo
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
// Check the contents of the JSON output
|
// Check the contents of the JSON output
|
||||||
// RUN: %FileCheck %s < %t/deps.json
|
// RUN: %FileCheck %s < %t/deps.json
|
||||||
// REQUIRES: objc_interop
|
// REQUIRES: OS=macosx
|
||||||
|
|
||||||
import CryptoKit
|
import CryptoKit
|
||||||
|
|
||||||
// CHECK: "mainModuleName": "deps"
|
// CHECK: "mainModuleName": "deps"
|
||||||
|
|||||||
Reference in New Issue
Block a user