Skip to content

Commit 6538d73

Browse files
committed
---
yaml --- r: 348019 b: refs/heads/master c: 9f1204d h: refs/heads/master i: 348017: 4598a37 348015: 9a3c849
1 parent 52d8cda commit 6538d73

File tree

4 files changed

+27
-50
lines changed

4 files changed

+27
-50
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 7ab888a38d15f69519007fbd40d7c9dc84d2d438
2+
refs/heads/master: 9f1204d817ba59ba2536d606e5af2d52318d306b
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/lib/ClangImporter/ImportDecl.cpp

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,14 +1140,14 @@ makeBitFieldAccessors(ClangImporter::Implementation &Impl,
11401140
recordType,
11411141
clang::VK_RValue,
11421142
clang::SourceLocation());
1143-
auto cGetterExpr = new (Ctx) clang::MemberExpr(cGetterSelfExpr,
1144-
/*isarrow=*/ false,
1145-
clang::SourceLocation(),
1146-
fieldDecl,
1147-
fieldNameInfo,
1148-
fieldType,
1149-
clang::VK_RValue,
1150-
clang::OK_BitField);
1143+
auto cGetterExpr = clang::MemberExpr::CreateImplicit(Ctx,
1144+
cGetterSelfExpr,
1145+
/*isarrow=*/ false,
1146+
fieldDecl,
1147+
fieldType,
1148+
clang::VK_RValue,
1149+
clang::OK_BitField);
1150+
11511151

11521152
auto cGetterBody = clang::ReturnStmt::Create(Ctx, clang::SourceLocation(),
11531153
cGetterExpr,
@@ -1185,14 +1185,13 @@ makeBitFieldAccessors(ClangImporter::Implementation &Impl,
11851185
clang::VK_RValue,
11861186
clang::SourceLocation());
11871187

1188-
auto cSetterMemberExpr = new (Ctx) clang::MemberExpr(cSetterSelfExpr,
1189-
/*isarrow=*/ true,
1190-
clang::SourceLocation(),
1191-
fieldDecl,
1192-
fieldNameInfo,
1193-
fieldType,
1194-
clang::VK_LValue,
1195-
clang::OK_BitField);
1188+
auto cSetterMemberExpr = clang::MemberExpr::CreateImplicit(Ctx,
1189+
cSetterSelfExpr,
1190+
/*isarrow=*/true,
1191+
fieldDecl,
1192+
fieldType,
1193+
clang::VK_LValue,
1194+
clang::OK_BitField);
11961195

11971196
auto cSetterValueExpr = new (Ctx) clang::DeclRefExpr(Ctx, cSetterValue, false,
11981197
fieldType,

trunk/tools/SourceKit/lib/SwiftLang/SwiftASTManager.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,6 @@ namespace SourceKit {
186186

187187
void ASTUnit::Implementation::consumeAsync(SwiftASTConsumerRef ConsumerRef,
188188
ASTUnitRef ASTRef) {
189-
#if defined(_WIN32)
190-
// Windows uses more up for stack space (why?) than macOS/Linux which
191-
// causes stack overflows in a dispatch thread with 64k stack. Passing
192-
// useDeepStack=true means it's given a _beginthreadex thread with an 8MB
193-
// stack.
194-
bool useDeepStack = true;
195-
#else
196-
bool useDeepStack = false;
197-
#endif
198189
Queue.dispatch([ASTRef, ConsumerRef]{
199190
SwiftASTConsumer &ASTConsumer = *ConsumerRef;
200191

@@ -206,7 +197,7 @@ namespace SourceKit {
206197
LOG_WARN_FUNC("did not find primary SourceFile");
207198
ConsumerRef->failed("did not find primary SourceFile");
208199
}
209-
}, useDeepStack);
200+
});
210201
}
211202

212203
ASTUnit::ASTUnit(uint64_t Generation, std::shared_ptr<SwiftStatistics> Stats)

trunk/tools/SourceKit/tools/sourcekitd-test/sourcekitd-test.cpp

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@
2626
#include "llvm/Support/MemoryBuffer.h"
2727
#include "llvm/Support/Regex.h"
2828
#include "llvm/Support/Signals.h"
29-
#include "llvm/Support/Threading.h"
3029
#include "llvm/Support/raw_ostream.h"
3130
#include <fstream>
3231
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
33-
#include <sys/param.h>
3432
#include <unistd.h>
33+
#include <sys/param.h>
3534
#elif defined(_WIN32)
3635
#define WIN32_LEAN_AND_MEAN
3736
#define NOMINMAX
@@ -212,26 +211,18 @@ static void printBufferedNotifications(bool syncWithService = true) {
212211
});
213212
}
214213

215-
struct skt_args {
216-
int argc;
217-
const char **argv;
218-
int ret;
219-
};
220-
static void skt_main(skt_args *args);
214+
static int skt_main(int argc, const char **argv);
221215

222216
int main(int argc, const char **argv) {
223217
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
224-
skt_args args = {argc, argv, 0};
225-
llvm::llvm_execute_on_thread((void (*)(void *))skt_main, &args);
226-
exit(args.ret);
218+
int ret = skt_main(argc, argv);
219+
exit(ret);
227220
});
228221

229222
dispatch_main();
230223
}
231224

232-
static void skt_main(skt_args *args) {
233-
int argc = args->argc;
234-
const char **argv = args->argv;
225+
static int skt_main(int argc, const char **argv) {
235226
llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
236227

237228
sourcekitd_initialize();
@@ -270,16 +261,14 @@ static void skt_main(skt_args *args) {
270261
break;
271262
if (int ret = handleTestInvocation(Args.slice(0, i), InitOpts)) {
272263
sourcekitd_shutdown();
273-
args->ret = ret;
274-
return;
264+
return ret;
275265
}
276-
Args = Args.slice(i + 1);
266+
Args = Args.slice(i+1);
277267
}
278268

279269
if (int ret = handleTestInvocation(Args, InitOpts)) {
280270
sourcekitd_shutdown();
281-
args->ret = ret;
282-
return;
271+
return ret;
283272
}
284273

285274
for (auto &info : asyncResponses) {
@@ -290,15 +279,13 @@ static void skt_main(skt_args *args) {
290279
if (handleResponse(info.response, info.options, info.sourceFilename,
291280
std::move(info.sourceBuffer), nullptr)) {
292281
sourcekitd_shutdown();
293-
args->ret = 1;
294-
return;
282+
return 1;
295283
}
296284
}
297285
printBufferedNotifications();
298286

299287
sourcekitd_shutdown();
300-
args->ret = 0;
301-
return;
288+
return 0;
302289
}
303290

304291
static inline const char *getInterfaceGenDocumentName() {

0 commit comments

Comments
 (0)