Skip to content

Commit e904eb7

Browse files
committed
---
yaml --- r: 347354 b: refs/heads/master c: dc2a19e h: refs/heads/master
1 parent 55727c2 commit e904eb7

File tree

4 files changed

+72
-88
lines changed

4 files changed

+72
-88
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: f56746949a9885cd8e33c4f8c750cd764e64e954
2+
refs/heads/master: dc2a19e307d6069e94684bb38763bf493c14e9d4
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/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static void addMandatoryOptPipeline(SILPassPipelinePlan &P) {
100100
// there.
101101
const auto &Options = P.getOptions();
102102
P.addClosureLifetimeFixup();
103-
if (Options.EnableMandatorySemanticARCOpts && Options.shouldOptimize()) {
103+
if (Options.shouldOptimize()) {
104104
P.addSemanticARCOpts();
105105
}
106106
if (Options.StripOwnershipDuringDiagnosticsPipeline)

trunk/tools/swift-api-digester/ModuleAnalyzerNodes.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "swift/AST/USRGeneration.h"
3939
#include "swift/AST/GenericSignature.h"
4040
#include "swift/AST/ProtocolConformance.h"
41+
#include "swift/AST/DiagnosticsModuleDiffer.h"
4142
#include "swift/Basic/ColorUtils.h"
4243
#include "swift/Basic/JSONSerialization.h"
4344
#include "swift/Basic/LLVMInitialize.h"
@@ -195,6 +196,7 @@ class SDKContext {
195196
bool shouldIgnore(Decl *D, const Decl* Parent = nullptr) const;
196197
ArrayRef<BreakingAttributeInfo> getBreakingAttributeInfo() const { return BreakingAttrs; }
197198
Optional<uint8_t> getFixedBinaryOrder(ValueDecl *VD) const;
199+
198200
template<class YAMLNodeTy, typename ...ArgTypes>
199201
void diagnose(YAMLNodeTy node, Diag<ArgTypes...> ID,
200202
typename detail::PassArgument<ArgTypes>::type... args) {
@@ -336,6 +338,19 @@ class SDKNodeDecl: public SDKNode {
336338
uint8_t getFixedBinaryOrder() const { return *FixedBinaryOrder; }
337339
virtual void jsonize(json::Output &Out) override;
338340
virtual void diagnose(SDKNode *Right) override;
341+
342+
// The first argument of the diag is always screening info.
343+
template<typename ...ArgTypes>
344+
void emitDiag(Diag<StringRef, ArgTypes...> ID,
345+
typename detail::PassArgument<ArgTypes>::type... Args) const {
346+
// Don't emit objc decls if we care about swift exclusively
347+
if (Ctx.getOpts().SwiftOnly) {
348+
if (isObjc())
349+
return;
350+
}
351+
Ctx.getDiags().diagnose(SourceLoc(), ID, getScreenInfo(),
352+
std::move(Args)...);
353+
}
339354
};
340355

341356
class SDKNodeRoot: public SDKNode {

0 commit comments

Comments
 (0)