Skip to content

[gardening] Remove duplicate #include:s, unused methods and variables. Fix headers. #7869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions include/swift/Runtime/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#ifndef SWIFT_RUNTIME_CONFIG_H
#define SWIFT_RUNTIME_CONFIG_H

// Bring in visibility attribute macros for library visibility.
#include "llvm/Support/Compiler.h"

/// Does the current Swift platform support "unbridged" interoperation
Expand Down Expand Up @@ -187,9 +188,6 @@

#endif

// Bring in visibility attribute macros for library visibility.
#include "llvm/Support/Compiler.h"

// Generates a name of the runtime entry's implementation by
// adding an underscore as a prefix and a suffix.
#define SWIFT_RT_ENTRY_IMPL(Name) _##Name##_
Expand Down
2 changes: 1 addition & 1 deletion include/swift/Syntax/UnknownSyntax.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===--- UnknownSyntax.h - Swift Unknown Syntax Interface -----------------===//
//===--- UnknownSyntax.h - Swift Unknown Syntax Interface -------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
Expand Down
2 changes: 1 addition & 1 deletion lib/Parse/ParseIfConfig.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===--- ParseDecl.cpp - Swift Language Parser for #if directives -- ------===//
//===--- ParseIfConfig.cpp - Swift Language Parser for #if directives -----===//
//
// This source file is part of the Swift.org open source project
//
Expand Down
14 changes: 0 additions & 14 deletions lib/SILOptimizer/Mandatory/AddressLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,6 @@ class ValueStorageMap {

return valueVector.back().second;
}

// Replace entry for `oldValue` with an entry for `newValue` preserving the
// the mapped ValueStorage.
void replaceValue(SILValue oldValue, SILValue newValue) {
auto hashIter = valueHashMap.find(oldValue);
assert(hashIter != valueHashMap.end() && "Missing SILValue");
unsigned idx = hashIter->second;
valueHashMap.erase(hashIter);

valueVector[idx].first = newValue;

auto hashResult = valueHashMap.insert(std::make_pair(newValue, idx));
assert(hashResult.second && "SILValue already mapped");
}
};
} // end anonymous namespace

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma clang assume_nonnull begin

struct __attribute__((swift_name("VeryImportantCStruct"))) SomeCStruct {
int field;
int field;
};

#pragma clang assume_nonnull end
2 changes: 1 addition & 1 deletion unittests/runtime/Refcounting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ TEST(RefcountingTest, isUniquelyReferencedOrPinned) {
// RC big, unpinned
EXPECT_FALSE(swift_isUniquelyReferencedOrPinned_nonNull_native(object));

auto pinResult = swift_tryPin(object);
swift_tryPin(object);
// RC big, pinned
EXPECT_TRUE(swift_isUniquelyReferencedOrPinned_nonNull_native(object));

Expand Down
1 change: 0 additions & 1 deletion unittests/runtime/weak.mm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <objc/runtime.h>
#include "swift/Runtime/HeapObject.h"
#include "swift/Runtime/Metadata.h"
#include "swift/Runtime/Metadata.h"
#include "gtest/gtest.h"

using namespace swift;
Expand Down