-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Batch mode] Move various Frontend pieces into dedicated files. #14001
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
Conversation
@swift-ci please smoke test os x platform |
@swift-ci please smoke test |
1 similar comment
@swift-ci please smoke test |
de30931
to
5883d02
Compare
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some project style notes, which apply to more than just the location I've indicated.
include/swift/Basic/InputFile.h
Outdated
// | ||
// This source file is part of the Swift.org open source project | ||
// | ||
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2018, now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. What about existing files? Should I update the dates in the future whenever I change one?
include/swift/Basic/InputFile.h
Outdated
//===----------------------------------------------------------------------===// | ||
|
||
|
||
#ifndef InputFile_h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the same header guard style as the other headers: SWIFT_BASIC_INPUTFILE. (Also, why is this in Basic instead of Frontend?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in all my new files. Moved from Basic to Frontend. (Had thought other parts of the compile would need that class, but at least they don't yet.)
@@ -0,0 +1,127 @@ | |||
//===--- FrontendInputs.h -------------------------------------------------===// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing the -*- c++ -*-
for the emacs folks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Supplied that for all my new files.
lib/Frontend/FrontendInputs.cpp
Outdated
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#include "swift/Frontend/FrontendOptions.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first include in a .cpp file should always be the corresponding header file, both to show which header is "corresponding" and to provide a small check that that header works standalone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in all my new files. Put a blank line after that include following what seemed to be a convention I saw elsewhere.
@@ -21,7 +22,7 @@ | |||
|
|||
#include <vector> | |||
|
|||
using namespace swift; | |||
using namespace swift; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stray indentation here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tx! Fixed.
@swift-ci please smoke test |
@swift-ci please smoke test |
#include "llvm/Option/ArgList.h" | ||
|
||
using namespace swift; | ||
using namespace llvm::opt; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, sorry. No using namespace
in headers, please (here and elsewhere).
lib/Frontend/CompilerInvocation.cpp
Outdated
@@ -10,9 +10,11 @@ | |||
// | |||
//===----------------------------------------------------------------------===// | |||
|
|||
#include "swift/Frontend/Frontend.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this one can stay, since it's the main header for the file despite not having the same name.
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than this one comment, LGTM!
@@ -0,0 +1,98 @@ | |||
//=== = ---ArgsToFrontendOptionsConverter.h-- -----------------*-C++ - * -=== // |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really nitpicky but the first line of this got messed up somehow.
@swift-ci please smoke test |
No description provided.