-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
[SandboxIR][NFC] Move sandboxir::Use into a separate file #99074
Conversation
llvm/include/llvm/SandboxIR/Use.h
Outdated
#include "llvm/Support/raw_ostream.h" | ||
|
||
namespace llvm { | ||
namespace sandboxir { |
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.
namespace llvm::sandboxir {
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.
Maybe not. llvm::Use
could be forward declared. IIRC raw_ostream
can also be forward declared.
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.
Why would we forward declare llvm::Use
?
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.
To get rid of the include.
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.
Including llvm IR header files is not going to cause any dependency issues, so I think it should be fine to keep it this way.
void dump(raw_ostream &OS) const; | ||
void dump() const; | ||
#endif // NDEBUG | ||
}; |
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.
A new line would be nice, but ...
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.
OK I will add one.
llvm/include/llvm/SandboxIR/Use.h
Outdated
@@ -0,0 +1,51 @@ | |||
#ifndef LLVM_TRANSFORMS_SANDBOXIR_USE_H | |||
#define LLVM_TRANSFORMS_SANDBOXIR_USE_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.
This is not in the transforms
directory. Maybe there was a version in transforms. The include guard looks odd.
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 good catch!
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.
It's also missing the LLVM header!
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 TRANSFORMS
was copy-pasted from SandboxIR.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.
True, let me fix that too.
This helps avoid circular dependencies in a follow-up patch.
This helps avoid circular dependencies in a follow-up patch.
Summary: This helps avoid circular dependencies in a follow-up patch. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251433
This helps avoid circular dependencies in a follow-up patch.