File tree Expand file tree Collapse file tree 2 files changed +4
-15
lines changed
source/Plugins/TypeSystem/Swift
test/API/lang/swift/module_import Expand file tree Collapse file tree 2 files changed +4
-15
lines changed Original file line number Diff line number Diff line change @@ -2921,21 +2921,20 @@ lldb::TypeSystemSP SwiftASTContext::CreateInstance(
2921
2921
2922
2922
ArchSpec preferred_arch;
2923
2923
llvm::Triple preferred_triple;
2924
- if (module_arch && module_triple != llvm::Triple ()) {
2924
+ if (module_arch && module_arch. IsFullySpecifiedTriple ()) {
2925
2925
LOG_PRINTF (GetLog (LLDBLog::Types),
2926
2926
" Preferring module triple %s over target triple %s." ,
2927
2927
module_triple.str ().c_str (), target_triple.str ().c_str ());
2928
2928
preferred_arch = module_arch;
2929
2929
preferred_triple = module_triple;
2930
2930
} else {
2931
- // When no module triple, fallback to the target triple.
2931
+ // When no viable module triple, fallback to the target triple.
2932
2932
preferred_arch = target_arch;
2933
2933
preferred_triple = target_triple;
2934
2934
}
2935
2935
2936
2936
llvm::Triple computed_triple;
2937
- if (preferred_arch.IsFullySpecifiedTriple () ||
2938
- !preferred_triple.isOSDarwin ()) {
2937
+ if (preferred_arch.IsFullySpecifiedTriple ()) {
2939
2938
// If a fully specified triple was passed in, for example
2940
2939
// through CreateTargetWithFileAndTargetTriple(), prefer that.
2941
2940
LOG_PRINTF (GetLog (LLDBLog::Types), " Fully specified target triple %s." ,
Original file line number Diff line number Diff line change @@ -18,16 +18,6 @@ def test(self):
18
18
19
19
log = self .getBuildArtifact ("types.log" )
20
20
self .runCmd ('log enable lldb types -f "%s"' % log )
21
- self .runCmd ("expression -- 0" , check = False )
22
- with open (log ) as f :
23
- lines = f .readlines ()
24
- if lines :
25
- for line in lines :
26
- print (line )
27
- print (line , file = sys .stderr )
28
- else :
29
- print ("### NO LOGS ###" )
30
- print ("### NO LOGS ###" , file = sys .stderr )
31
- self .assertTrue (False )
21
+ self .expect ("expression -- 0" )
32
22
self .filecheck ('platform shell cat "%s"' % log , __file__ )
33
23
# CHECK: SwiftASTContextForExpressions{{.*}}Module import remark: loaded module 'a'
You can’t perform that action at this time.
0 commit comments