@@ -170,14 +170,14 @@ CachedCommandAdaptor::getIdentifier() const {
170
170
return Id;
171
171
}
172
172
173
- CachedCommand::CachedCommand (driver::Command &Command,
174
- DiagnosticOptions &DiagOpts,
175
- llvm::vfs::FileSystem &VFS,
176
- ExecuteFnTy &&ExecuteImpl)
173
+ ClangCommand::ClangCommand (driver::Command &Command,
174
+ DiagnosticOptions &DiagOpts,
175
+ llvm::vfs::FileSystem &VFS,
176
+ ExecuteFnTy &&ExecuteImpl)
177
177
: Command(Command), DiagOpts(DiagOpts), VFS(VFS),
178
178
ExecuteImpl (std::move(ExecuteImpl)) {}
179
179
180
- Error CachedCommand ::addInputIdentifier (HashAlgorithm &H) const {
180
+ Error ClangCommand ::addInputIdentifier (HashAlgorithm &H) const {
181
181
auto Inputs (getInputFiles (Command));
182
182
for (StringRef Input : Inputs) {
183
183
if (Error E = addFile (H, Input)) {
@@ -188,7 +188,7 @@ Error CachedCommand::addInputIdentifier(HashAlgorithm &H) const {
188
188
return Error::success ();
189
189
}
190
190
191
- void CachedCommand ::addOptionsIdentifier (HashAlgorithm &H) const {
191
+ void ClangCommand ::addOptionsIdentifier (HashAlgorithm &H) const {
192
192
auto Inputs (getInputFiles (Command));
193
193
StringRef Output = Command.getOutputFilenames ().front ();
194
194
ArrayRef<const char *> Arguments = Command.getArguments ();
@@ -230,11 +230,11 @@ void CachedCommand::addOptionsIdentifier(HashAlgorithm &H) const {
230
230
}
231
231
}
232
232
233
- CachedCommand ::ActionClass CachedCommand ::getClass () const {
233
+ ClangCommand ::ActionClass ClangCommand ::getClass () const {
234
234
return Command.getSource ().getKind ();
235
235
}
236
236
237
- bool CachedCommand ::canCache () const {
237
+ bool ClangCommand ::canCache () const {
238
238
bool HasOneOutput = Command.getOutputFilenames ().size () == 1 ;
239
239
bool IsPreprocessorCommand = getClass () == driver::Action::PreprocessJobClass;
240
240
@@ -248,7 +248,7 @@ bool CachedCommand::canCache() const {
248
248
!hasDebugOrProfileInfo (Command.getArguments ());
249
249
}
250
250
251
- Error CachedCommand ::writeExecuteOutput (StringRef CachedBuffer) {
251
+ Error ClangCommand ::writeExecuteOutput (StringRef CachedBuffer) {
252
252
StringRef OutputFilename = Command.getOutputFilenames ().front ();
253
253
std::error_code EC;
254
254
raw_fd_ostream Out (OutputFilename, EC);
@@ -269,7 +269,7 @@ Error CachedCommand::writeExecuteOutput(StringRef CachedBuffer) {
269
269
return Error::success ();
270
270
}
271
271
272
- Expected<StringRef> CachedCommand ::readExecuteOutput () {
272
+ Expected<StringRef> ClangCommand ::readExecuteOutput () {
273
273
StringRef OutputFilename = Command.getOutputFilenames ().front ();
274
274
ErrorOr<std::unique_ptr<MemoryBuffer>> MBOrErr =
275
275
MemoryBuffer::getFile (OutputFilename);
@@ -282,7 +282,7 @@ Expected<StringRef> CachedCommand::readExecuteOutput() {
282
282
return Output->getBuffer ();
283
283
}
284
284
285
- amd_comgr_status_t CachedCommand ::execute (llvm::raw_ostream &LogS) {
285
+ amd_comgr_status_t ClangCommand ::execute (llvm::raw_ostream &LogS) {
286
286
return ExecuteImpl (Command, LogS, DiagOpts, VFS);
287
287
}
288
288
} // namespace COMGR
0 commit comments