Skip to content

Commit 9746a28

Browse files
author
Nathan Hawes
authored
Merge pull request #15135 from nathawes/rdar38314383-ignore-llvm-args-for-sourcekit-ast-manager-invocation
Clear any LLVMArgs when initializing the CompilerInvocation for SourceKit's ASTManager
2 parents 77ae03e + 17a6ef5 commit 9746a28

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
_ = ""
2+
3+
// rdar://problem/38314383
4+
// RUN: %sourcekitd-test -req=cursor -offset=0 %s -- -Xllvm -aarch64-use-tbi %s | %FileCheck %s
5+
6+
// CHECK: <empty cursor info>

tools/SourceKit/lib/Support/Logging.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Logger::~Logger() {
6363
OS << llvm::format("%7.4f] ", TR.getWallTime() - sBeginTR.getWallTime());
6464
OS << Msg.str();
6565

66-
llvm::errs() << LoggerName << ": " << LogMsg.str() << '\n';
66+
fprintf(stderr, "%s: %s", LoggerName.c_str(), LogMsg.c_str());
6767

6868
#if __APPLE__
6969
// Use the Apple System Log facility.

tools/SourceKit/lib/SwiftLang/SwiftASTManager.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,9 @@ bool SwiftASTManager::initCompilerInvocation(CompilerInvocation &Invocation,
459459
// SwiftONoneSupport module.
460460
FrontendOpts.RequestedAction = FrontendOptions::ActionType::Typecheck;
461461

462+
// We don't care about LLVMArgs
463+
FrontendOpts.LLVMArgs.clear();
464+
462465
return false;
463466
}
464467

0 commit comments

Comments
 (0)