Skip to content

Commit f3f3a07

Browse files
committed
review: use terminology directed for objcopy
1 parent acfd4d5 commit f3f3a07

File tree

6 files changed

+26
-25
lines changed

6 files changed

+26
-25
lines changed

clang/include/clang/Driver/Action.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ class Action {
7676
StaticLibJobClass,
7777
BinaryAnalyzeJobClass,
7878
BinaryTranslatorJobClass,
79-
BinaryModifyJobClass,
79+
ObjcopyJobClass,
8080

8181
JobClassFirst = PreprocessJobClass,
82-
JobClassLast = BinaryModifyJobClass
82+
JobClassLast = ObjcopyJobClass
8383
};
8484

8585
// The offloading kind determines if this action is binded to a particular
@@ -688,14 +688,14 @@ class BinaryTranslatorJobAction : public JobAction {
688688
}
689689
};
690690

691-
class BinaryModifyJobAction : public JobAction {
691+
class ObjcopyJobAction : public JobAction {
692692
void anchor() override;
693693

694694
public:
695-
BinaryModifyJobAction(Action *Input, types::ID Type);
695+
ObjcopyJobAction(Action *Input, types::ID Type);
696696

697697
static bool classof(const Action *A) {
698-
return A->getKind() == BinaryModifyJobClass;
698+
return A->getKind() == ObjcopyJobClass;
699699
}
700700
};
701701

clang/lib/Driver/Action.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ const char *Action::getClassName(ActionClass AC) {
5252
return "binary-analyzer";
5353
case BinaryTranslatorJobClass:
5454
return "binary-translator";
55-
case BinaryModifyJobClass:
56-
return "binary-modifier";
55+
case ObjcopyJobClass:
56+
return "objcopy";
5757
}
5858

5959
llvm_unreachable("invalid class");
@@ -470,7 +470,7 @@ BinaryTranslatorJobAction::BinaryTranslatorJobAction(Action *Input,
470470
types::ID Type)
471471
: JobAction(BinaryTranslatorJobClass, Input, Type) {}
472472

473-
void BinaryModifyJobAction::anchor() {}
473+
void ObjcopyJobAction::anchor() {}
474474

475-
BinaryModifyJobAction::BinaryModifyJobAction(Action *Input, types::ID Type)
476-
: JobAction(BinaryModifyJobClass, Input, Type) {}
475+
ObjcopyJobAction::ObjcopyJobAction(Action *Input, types::ID Type)
476+
: JobAction(ObjcopyJobClass, Input, Type) {}

clang/lib/Driver/Driver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4669,8 +4669,8 @@ void Driver::BuildDefaultActions(Compilation &C, DerivedArgList &Args,
46694669
// (TY_OBJECT).
46704670
if (LastAction->getType() == types::TY_DX_CONTAINER ||
46714671
LastAction->getType() == types::TY_Object)
4672-
Actions.push_back(C.MakeAction<BinaryModifyJobAction>(
4673-
LastAction, types::TY_DX_CONTAINER));
4672+
Actions.push_back(
4673+
C.MakeAction<ObjcopyJobAction>(LastAction, types::TY_DX_CONTAINER));
46744674
}
46754675
}
46764676

clang/lib/Driver/ToolChain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ Tool *ToolChain::getTool(Action::ActionClass AC) const {
652652
case Action::VerifyDebugInfoJobClass:
653653
case Action::BinaryAnalyzeJobClass:
654654
case Action::BinaryTranslatorJobClass:
655-
case Action::BinaryModifyJobClass:
655+
case Action::ObjcopyJobClass:
656656
llvm_unreachable("Invalid tool kind.");
657657

658658
case Action::CompileJobClass:

clang/lib/Driver/ToolChains/HLSL.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,11 @@ void tools::hlsl::MetalConverter::ConstructJob(
295295
Exec, CmdArgs, Inputs, Input));
296296
}
297297

298-
void tools::hlsl::LLVMObjcopy::ConstructJob(Compilation &C, const JobAction &JA,
299-
const InputInfo &Output,
300-
const InputInfoList &Inputs,
301-
const ArgList &Args,
302-
const char *LinkingOutput) const {
298+
void tools::LLVMObjcopy::ConstructJob(Compilation &C, const JobAction &JA,
299+
const InputInfo &Output,
300+
const InputInfoList &Inputs,
301+
const ArgList &Args,
302+
const char *LinkingOutput) const {
303303

304304
std::string ObjcopyPath = getToolChain().GetProgramPath("llvm-objcopy");
305305
const char *Exec = Args.MakeArgString(ObjcopyPath);
@@ -339,9 +339,9 @@ Tool *clang::driver::toolchains::HLSLToolChain::getTool(
339339
if (!MetalConverter)
340340
MetalConverter.reset(new tools::hlsl::MetalConverter(*this));
341341
return MetalConverter.get();
342-
case Action::BinaryModifyJobClass:
342+
case Action::ObjcopyJobClass:
343343
if (!LLVMObjcopy)
344-
LLVMObjcopy.reset(new tools::hlsl::LLVMObjcopy(*this));
344+
LLVMObjcopy.reset(new tools::LLVMObjcopy(*this));
345345
return LLVMObjcopy.get();
346346
default:
347347
return ToolChain::getTool(AC);
@@ -498,7 +498,7 @@ bool HLSLToolChain::isLastJob(DerivedArgList &Args,
498498
(!HasTranslation && HasValidation &&
499499
AC == Action::BinaryAnalyzeJobClass) ||
500500
(!HasTranslation && !HasValidation && HasObjcopy &&
501-
AC == Action::BinaryModifyJobClass))
501+
AC == Action::ObjcopyJobClass))
502502
return true;
503503
return false;
504504
}

clang/lib/Driver/ToolChains/HLSL.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ class LLVM_LIBRARY_VISIBILITY MetalConverter : public Tool {
4343
const char *LinkingOutput) const override;
4444
};
4545

46+
} // namespace hlsl
47+
4648
class LLVM_LIBRARY_VISIBILITY LLVMObjcopy : public Tool {
4749
public:
48-
LLVMObjcopy(const ToolChain &TC)
49-
: Tool("hlsl::LLVMObjcopy", "llvm-objcopy", TC) {}
50+
LLVMObjcopy(const ToolChain &TC) : Tool("LLVMObjcopy", "llvm-objcopy", TC) {}
5051

5152
bool hasIntegratedCPP() const override { return false; }
5253

@@ -55,7 +56,7 @@ class LLVM_LIBRARY_VISIBILITY LLVMObjcopy : public Tool {
5556
const llvm::opt::ArgList &TCArgs,
5657
const char *LinkingOutput) const override;
5758
};
58-
} // namespace hlsl
59+
5960
} // namespace tools
6061

6162
namespace toolchains {
@@ -87,7 +88,7 @@ class LLVM_LIBRARY_VISIBILITY HLSLToolChain : public ToolChain {
8788
private:
8889
mutable std::unique_ptr<tools::hlsl::Validator> Validator;
8990
mutable std::unique_ptr<tools::hlsl::MetalConverter> MetalConverter;
90-
mutable std::unique_ptr<tools::hlsl::LLVMObjcopy> LLVMObjcopy;
91+
mutable std::unique_ptr<tools::LLVMObjcopy> LLVMObjcopy;
9192
};
9293

9394
} // end namespace toolchains

0 commit comments

Comments
 (0)