Skip to content

Commit ce3ccfb

Browse files
phauslerjrose-apple
authored andcommitted
Change shims to always be counted as system headers via -isystem instead of conditionally marking them in debug versus non debug builds. (#7979)
1 parent 4f927c4 commit ce3ccfb

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,11 +323,7 @@ void ClangImporter::clearTypeResolver() {
323323

324324
#pragma mark Module loading
325325

326-
#ifdef NDEBUG
327326
#define SHIMS_INCLUDE_FLAG "-isystem"
328-
#else
329-
#define SHIMS_INCLUDE_FLAG "-I"
330-
#endif
331327

332328
static StringRef
333329
getMinVersionOptNameForDarwinTriple(const llvm::Triple &triple) {

stdlib/public/SDK/Foundation/Data.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -875,11 +875,11 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl
875875
#else
876876
switch self {
877877
case .virtualMemory:
878-
return { NSDataDeallocatorVM($0, UInt($1)) }
878+
return { NSDataDeallocatorVM($0, $1) }
879879
case .unmap:
880-
return { NSDataDeallocatorUnmap($0, UInt($1)) }
880+
return { NSDataDeallocatorUnmap($0, $1) }
881881
case .free:
882-
return { NSDataDeallocatorFree($0, UInt($1)) }
882+
return { NSDataDeallocatorFree($0, $1) }
883883
case .none:
884884
return { _, _ in }
885885
case .custom(let b):

stdlib/public/SDK/Foundation/IndexSet.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,9 @@ public struct IndexSet : ReferenceConvertible, Equatable, BidirectionalCollectio
258258

259259
private func _indexOfRange(containing integer : Element) -> RangeView.Index? {
260260
let result = _handle.map {
261-
__NSIndexSetIndexOfRangeContainingIndex($0, UInt(integer))
261+
__NSIndexSetIndexOfRangeContainingIndex($0, integer)
262262
}
263-
if result == UInt(NSNotFound) {
263+
if result == NSNotFound {
264264
return nil
265265
} else {
266266
return Int(result)
@@ -269,9 +269,9 @@ public struct IndexSet : ReferenceConvertible, Equatable, BidirectionalCollectio
269269

270270
private func _range(at index: RangeView.Index) -> Range<Element> {
271271
return _handle.map {
272-
var location: UInt = 0
273-
var length: UInt = 0
274-
__NSIndexSetRangeAtIndex($0, UInt(index), &location, &length)
272+
var location: Int = 0
273+
var length: Int = 0
274+
__NSIndexSetRangeAtIndex($0, index, &location, &length)
275275
return Int(location)..<Int(location)+Int(length)
276276
}
277277
}

stdlib/public/SDK/Foundation/NSDictionary.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ extension NSDictionary {
233233
let valueBuffer = buffer.bindMemory(to: AnyObject.self, capacity: numElems)
234234
let buffer2 = buffer + singleSize
235235

236-
__NSDictionaryGetObjects(otherDictionary, buffer, buffer2, UInt(numElems))
236+
__NSDictionaryGetObjects(otherDictionary, buffer, buffer2, numElems)
237237

238238
let keyBufferCopying = buffer2.assumingMemoryBound(to: NSCopying.self)
239239
self.init(objects: valueBuffer, forKeys: keyBufferCopying, count: numElems)

0 commit comments

Comments
 (0)