Skip to content

[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

Merged
merged 4 commits into from
Jan 19, 2018

Conversation

davidungar
Copy link
Contributor

No description provided.

@davidungar
Copy link
Contributor Author

@swift-ci please smoke test os x platform

@davidungar
Copy link
Contributor Author

@swift-ci please smoke test

1 similar comment
@davidungar
Copy link
Contributor Author

@swift-ci please smoke test

@davidungar davidungar force-pushed the PR-18-3a branch 2 times, most recently from de30931 to 5883d02 Compare January 18, 2018 05:28
@davidungar
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@jrose-apple jrose-apple left a 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.

//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2018, now!

Copy link
Contributor Author

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?

//===----------------------------------------------------------------------===//


#ifndef InputFile_h
Copy link
Contributor

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?)

Copy link
Contributor Author

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 -------------------------------------------------===//
Copy link
Contributor

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.

Copy link
Contributor Author

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.

//
//===----------------------------------------------------------------------===//

#include "swift/Frontend/FrontendOptions.h"
Copy link
Contributor

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.

Copy link
Contributor Author

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stray indentation here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tx! Fixed.

@davidungar
Copy link
Contributor Author

@swift-ci please smoke test

@davidungar
Copy link
Contributor Author

@swift-ci please smoke test

#include "llvm/Option/ArgList.h"

using namespace swift;
using namespace llvm::opt;
Copy link
Contributor

@jrose-apple jrose-apple Jan 18, 2018

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).

@@ -10,9 +10,11 @@
//
//===----------------------------------------------------------------------===//

#include "swift/Frontend/Frontend.h"
Copy link
Contributor

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.

@davidungar
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@jrose-apple jrose-apple left a 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++ - * -=== //
Copy link
Contributor

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.

@davidungar
Copy link
Contributor Author

@swift-ci please smoke test

@davidungar davidungar merged commit 36496ae into swiftlang:master Jan 19, 2018
@davidungar davidungar deleted the PR-18-3a branch March 1, 2018 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants