Skip to content

Canonicalize swift header files headers and footers #1796

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 1 commit into from
Mar 30, 2016
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
2 changes: 1 addition & 1 deletion include/swift/Basic/Algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ namespace swift {
}
} // end namespace swift

#endif /* SWIFT_BASIC_ALGORITHM_H */
#endif // SWIFT_BASIC_ALGORITHM_H
4 changes: 2 additions & 2 deletions include/swift/Basic/ArrayRefView.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,6 @@ class ArrayRefView {
}
};

} // namespace swift
} // end namespace swift

#endif /* SWIFT_BASIC_ARRAYREFVIEW_H */
#endif // SWIFT_BASIC_ARRAYREFVIEW_H
6 changes: 3 additions & 3 deletions include/swift/Basic/AssertImplements.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef SWIFT_BASIC_ASSERT_IMPLEMENTS_H
#define SWIFT_BASIC_ASSERT_IMPLEMENTS_H
#ifndef SWIFT_BASIC_ASSERTIMPLEMENTS_H
#define SWIFT_BASIC_ASSERTIMPLEMENTS_H

#include <type_traits>

Expand Down Expand Up @@ -61,4 +61,4 @@ namespace swift {

} // end namespace swift

#endif // SWIFT_BASIC_ASSERT_IMPLEMENTS_H
#endif // SWIFT_BASIC_ASSERTIMPLEMENTS_H
6 changes: 3 additions & 3 deletions include/swift/Basic/Cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ struct CacheValueInfo<llvm::IntrusiveRefCntPtr<T>>{
}
};

} // namespace sys
} // namespace swift
} // end namespace sys
} // end namespace swift

#endif
#endif // SWIFT_BASIC_CACHE_H
2 changes: 1 addition & 1 deletion include/swift/Basic/ClusteredBitVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -674,4 +674,4 @@ class ClusteredBitVector {

} // end namespace swift

#endif
#endif // SWIFT_BASIC_CLUSTEREDBITVECTOR_H
8 changes: 4 additions & 4 deletions include/swift/Basic/Defer.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef __SWIFT_DEFER_H
#define __SWIFT_DEFER_H
#ifndef SWIFT_BASIC_DEFER_H
#define SWIFT_BASIC_DEFER_H

#include <type_traits>

Expand All @@ -39,7 +39,7 @@ namespace swift {
return DoAtScopeExit<typename std::decay<F>::type>(fn);
}
}
}
} // end namespace swift


#define DEFER_CONCAT_IMPL(x, y) x##y
Expand All @@ -57,5 +57,5 @@ namespace swift {
/// };
///
#define defer defer_impl
#endif

#endif // SWIFT_BASIC_DEFER_H
3 changes: 1 addition & 2 deletions include/swift/Basic/Demangle.h
Original file line number Diff line number Diff line change
Expand Up @@ -419,5 +419,4 @@ static inline bool isDigit(int c) {
} // end namespace Demangle
} // end namespace swift

#endif

#endif // SWIFT_BASIC_DEMANGLE_H
7 changes: 3 additions & 4 deletions include/swift/Basic/DemangleWrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
///
//===----------------------------------------------------------------------===//

#ifndef SWIFT_BASIC_DEMANGLE_WRAPPERS_H
#define SWIFT_BASIC_DEMANGLE_WRAPPERS_H
#ifndef SWIFT_BASIC_DEMANGLEWRAPPERS_H
#define SWIFT_BASIC_DEMANGLEWRAPPERS_H

#include "swift/Basic/Demangle.h"
#include "swift/Basic/LLVM.h"
Expand Down Expand Up @@ -57,5 +57,4 @@ demangleTypeAsString(StringRef MangledTypeName,
} // end namespace demangle_wrappers
} // end namespace swift

#endif // LLVM_SWIFT_BASIC_DEMANGLE_WRAPPERS_H

#endif // SWIFT_BASIC_DEMANGLEWRAPPERS_H
8 changes: 4 additions & 4 deletions include/swift/Basic/DiagnosticConsumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef SWIFT_BASIC_DIAGNOSTIC_CONSUMER_H
#define SWIFT_BASIC_DIAGNOSTIC_CONSUMER_H
#ifndef SWIFT_BASIC_DIAGNOSTICCONSUMER_H
#define SWIFT_BASIC_DIAGNOSTICCONSUMER_H

#include "swift/Basic/SourceLoc.h"
#include "llvm/Support/SourceMgr.h"
Expand Down Expand Up @@ -103,6 +103,6 @@ class NullDiagnosticConsumer : public DiagnosticConsumer {
const DiagnosticInfo &Info) override;
};

}
} // end namespace swift

#endif
#endif // SWIFT_BASIC_DIAGNOSTICCONSUMER_H
4 changes: 2 additions & 2 deletions include/swift/Basic/DiagnosticOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ class DiagnosticOptions {
bool WarningsAsErrors = false;
};

}
} // end namespace swift

#endif
#endif // SWIFT_BASIC_DIAGNOSTICOPTIONS_H
6 changes: 3 additions & 3 deletions include/swift/Basic/DiverseList.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef SWIFT_IRGEN_DIVERSELIST_H
#define SWIFT_IRGEN_DIVERSELIST_H
#ifndef SWIFT_BASIC_DIVERSELIST_H
#define SWIFT_BASIC_DIVERSELIST_H

#include <cassert>
#include <cstring>
Expand Down Expand Up @@ -285,4 +285,4 @@ template <class T> class DiverseListImpl : private DiverseListBase {

} // end namespace swift

#endif
#endif // SWIFT_BASIC_DIVERSELIST_H
6 changes: 3 additions & 3 deletions include/swift/Basic/DiverseStack.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef SWIFT_IRGEN_DIVERSESTACK_H
#define SWIFT_IRGEN_DIVERSESTACK_H
#ifndef SWIFT_BASIC_DIVERSESTACK_H
#define SWIFT_BASIC_DIVERSESTACK_H

#include "swift/Basic/Malloc.h"
#include "llvm/Support/PointerLikeTypeTraits.h"
Expand Down Expand Up @@ -380,4 +380,4 @@ namespace llvm {
};
}

#endif
#endif // SWIFT_BASIC_DIVERSESTACK_H
4 changes: 2 additions & 2 deletions include/swift/Basic/Dwarf.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ namespace swift {
static const char MachOASTSectionName[] = "__ast";
static const char ELFASTSectionName[] = ".swift_ast";
static const char COFFASTSectionName[] = "swiftast";
}
} // end namespace swift

#endif
#endif // SWIFT_BASIC_DWARF_H
5 changes: 2 additions & 3 deletions include/swift/Basic/EditorPlaceholder.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ struct EditorPlaceholderData {
Optional<EditorPlaceholderData>
parseEditorPlaceholder(StringRef PlaceholderText);

} // namespace swift

#endif // LLVM_SWIFT_BASIC_EDITORPLACEHOLDER_H
} // end namespace swift

#endif // SWIFT_BASIC_EDITORPLACEHOLDER_H
2 changes: 1 addition & 1 deletion include/swift/Basic/EncodedSequence.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,4 +371,4 @@ class EncodedSequence : public EncodedSequenceBase {

} // end namespace swift

#endif
#endif // SWIFT_BASIC_ENCODEDSEQUENCE_H
6 changes: 3 additions & 3 deletions include/swift/Basic/Fallthrough.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef __SWIFT_FALLTHROUGH_H__
#define __SWIFT_FALLTHROUGH_H__
#ifndef SWIFT_BASIC_FALLTHROUGH_H
#define SWIFT_BASIC_FALLTHROUGH_H

#ifndef __has_attribute
# define __has_attribute(x) 0
Expand All @@ -36,4 +36,4 @@
# define SWIFT_FALLTHROUGH
#endif

#endif
#endif // SWIFT_BASIC_FALLTHROUGH_H
4 changes: 2 additions & 2 deletions include/swift/Basic/FileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ namespace swift {
/// the file at \p source will still be present at \p source.
std::error_code moveFileIfDifferent(const llvm::Twine &source,
const llvm::Twine &destination);
}
} // end namespace swift

#endif
#endif // SWIFT_BASIC_FILESYSTEM_H
8 changes: 4 additions & 4 deletions include/swift/Basic/FlaggedPointer.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
//
//===----------------------------------------------------------------------===//
//
#ifndef SWIFT_RUNTIME_FLAGGEDPOINTER_H
#define SWIFT_RUNTIME_FLAGGEDPOINTER_H
#ifndef SWIFT_BASIC_FLAGGEDPOINTER_H
#define SWIFT_BASIC_FLAGGEDPOINTER_H

#include <cassert>

Expand Down Expand Up @@ -148,7 +148,7 @@ class FlaggedPointer {
}
};

};
} // end namespace swift

// Teach SmallPtrSet that FlaggedPointer is "basically a pointer".
template <typename PointerTy, unsigned BitPosition, typename PtrTraits>
Expand All @@ -175,4 +175,4 @@ class llvm::PointerLikeTypeTraits<
};
};

#endif
#endif // SWIFT_BASIC_FLAGGEDPOINTER_H
2 changes: 1 addition & 1 deletion include/swift/Basic/ImmutablePointerSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,4 +349,4 @@ ImmutablePointerSet<T> ImmutablePointerSetFactory<T>::EmptyPtrSet =

} // end swift namespace

#endif
#endif // SWIFT_BASIC_IMMUTABLEPOINTERSET_H
2 changes: 1 addition & 1 deletion include/swift/Basic/JSONSerialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -626,4 +626,4 @@ operator<<(Output &yout, T &seq) {
} // end namespace json
} // end namespace swift

#endif
#endif // SWIFT_BASIC_JSONSERIALIZATION_H
6 changes: 3 additions & 3 deletions include/swift/Basic/LLVM.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef SWIFT_AST_LLVM_H
#define SWIFT_AST_LLVM_H
#ifndef SWIFT_BASIC_LLVM_H
#define SWIFT_BASIC_LLVM_H

// Do not proliferate #includes here, require clients to #include their
// dependencies.
Expand Down Expand Up @@ -79,4 +79,4 @@ namespace swift {
using llvm::NoneType;
} // end namespace swift

#endif
#endif // SWIFT_BASIC_LLVM_H
2 changes: 1 addition & 1 deletion include/swift/Basic/LLVMInitialize.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
llvm::InitializeAllDisassemblers(); \
llvm::InitializeAllTargetInfos();

#endif
#endif // SWIFT_BASIC_LLVMINITIALIZE_H
9 changes: 4 additions & 5 deletions include/swift/Basic/LangOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef SWIFT_LANGOPTIONS_H
#define SWIFT_LANGOPTIONS_H
#ifndef SWIFT_BASIC_LANGOPTIONS_H
#define SWIFT_BASIC_LANGOPTIONS_H

#include "swift/Basic/LLVM.h"
#include "clang/Basic/VersionTuple.h"
Expand Down Expand Up @@ -245,7 +245,6 @@ namespace swift {
PlatformConditionValues;
llvm::SmallVector<std::string, 2> CustomConditionalCompilationFlags;
};
}

#endif // SWIFT_LANGOPTIONS_H
} // end namespace swift

#endif // SWIFT_BASIC_LANGOPTIONS_H
2 changes: 1 addition & 1 deletion include/swift/Basic/Lazy.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ template <typename T> inline T &Lazy<T>::get(void (*initCallback)(void*)) {
return unsafeGetAlreadyInitialized();
}

} // namespace swift
} // end namespace swift

#define SWIFT_LAZY_CONSTANT(INITIAL_VALUE) \
([]{ \
Expand Down
2 changes: 1 addition & 1 deletion include/swift/Basic/NullablePtr.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ class NullablePtr {

} // end namespace swift

#endif
#endif // SWIFT_BASIC_NULLABLEPTR_H
4 changes: 2 additions & 2 deletions include/swift/Basic/OptionSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,6 @@ class OptionSet {
"operator| should produce an OptionSet");
};

}
} // end namespace swift

#endif
#endif // SWIFT_BASIC_OPTIONSET_H
4 changes: 2 additions & 2 deletions include/swift/Basic/OptionalEnum.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ namespace swift {
return (intptr_t)Storage;
}
};
}
} // end namespace swift

#endif
#endif // SWIFT_BASIC_OPTIONALENUM_H
2 changes: 1 addition & 1 deletion include/swift/Basic/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace swift {

/// Returns the platform Kind for Darwin triples.
DarwinPlatformKind getDarwinPlatformKind(const llvm::Triple &triple);
}
} // end namespace swift

#endif // SWIFT_BASIC_PLATFORM_H

5 changes: 5 additions & 0 deletions include/swift/Basic/PointerIntEnum.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
//
//===----------------------------------------------------------------------===//

#ifndef SWIFT_BASIC_POINTERINTENUM_H
#define SWIFT_BASIC_POINTERINTENUM_H

#include "swift/Basic/LLVM.h"
#include "llvm/ADT/Optional.h"
#include "llvm/Support/PointerLikeTypeTraits.h"
Expand Down Expand Up @@ -223,3 +226,5 @@ class PointerIntEnum {
};

} // end swift namespace

#endif // SWIFT_BASIC_POINTERINTENUM_H
2 changes: 1 addition & 1 deletion include/swift/Basic/PrefixMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -679,4 +679,4 @@ class PrefixMapKeyPrinter<unsigned char> {

} // end namespace swift

#endif
#endif // SWIFT_BASIC_PREFIXMAP_H
4 changes: 2 additions & 2 deletions include/swift/Basic/PrettyStackTrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ class PrettyStackTraceStringAction : public llvm::PrettyStackTraceEntry {
void print(llvm::raw_ostream &OS) const override;
};

}
} // end namespace swift

#endif
#endif // SWIFT_BASIC_PRETTYSTACKTRACE_H
4 changes: 2 additions & 2 deletions include/swift/Basic/PrimitiveParsing.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static inline void splitIntoLines(StringRef Text,
trimLeadingWhitespaceFromLines(Text, 0, Lines);
}

} // namespace swift
} // end namespace swift

#endif // LLVM_SWIFT_BASIC_PRIMITIVEPARSING_H
#endif // SWIFT_BASIC_PRIMITIVEPARSING_H

2 changes: 1 addition & 1 deletion include/swift/Basic/Program.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ int ExecuteInPlace(const char *Program, const char **args,

} // end namespace swift

#endif
#endif // SWIFT_BASIC_PROGRAM_H
2 changes: 1 addition & 1 deletion include/swift/Basic/Punycode.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ bool decodePunycodeUTF8(StringRef InputPunycode, std::string &OutUTF8);
} // end namespace Punycode
} // end namespace swift

#endif // LLVM_SWIFT_BASIC_PUNYCODE_H
#endif // SWIFT_BASIC_PUNYCODE_H

Loading