[PATCH] D101490: [NFC] Rename SanitizeAddressDtorKind codegen opt to not have `Kind` suffix.

2021-04-28 Thread Dan Liew via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1bbbcff99de8: [NFC] Rename SanitizeAddressDtorKind codegen 
opt to not have `Kind` suffix. (authored by delcypher).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101490/new/

https://reviews.llvm.org/D101490

Files:
  clang/include/clang/Basic/CodeGenOptions.def
  clang/include/clang/Driver/Options.td
  clang/lib/CodeGen/BackendUtil.cpp


Index: clang/lib/CodeGen/BackendUtil.cpp
===
--- clang/lib/CodeGen/BackendUtil.cpp
+++ clang/lib/CodeGen/BackendUtil.cpp
@@ -287,7 +287,7 @@
   bool UseAfterScope = CGOpts.SanitizeAddressUseAfterScope;
   bool UseOdrIndicator = CGOpts.SanitizeAddressUseOdrIndicator;
   bool UseGlobalsGC = asanUseGlobalsGC(T, CGOpts);
-  llvm::AsanDtorKind DestructorKind = CGOpts.getSanitizeAddressDtorKind();
+  llvm::AsanDtorKind DestructorKind = CGOpts.getSanitizeAddressDtor();
   PM.add(createAddressSanitizerFunctionPass(/*CompileKernel*/ false, Recover,
 UseAfterScope));
   PM.add(createModuleAddressSanitizerLegacyPassPass(
@@ -1150,7 +1150,7 @@
 bool ModuleUseAfterScope = asanUseGlobalsGC(TargetTriple, CodeGenOpts);
 bool UseOdrIndicator = CodeGenOpts.SanitizeAddressUseOdrIndicator;
 llvm::AsanDtorKind DestructorKind =
-CodeGenOpts.getSanitizeAddressDtorKind();
+CodeGenOpts.getSanitizeAddressDtor();
 MPM.addPass(RequireAnalysisPass());
 MPM.addPass(ModuleAddressSanitizerPass(
 CompileKernel, Recover, ModuleUseAfterScope, UseOdrIndicator,
Index: clang/include/clang/Driver/Options.td
===
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -1548,7 +1548,7 @@
   Values<"none,global">,
   NormalizedValuesScope<"llvm::AsanDtorKind">,
   NormalizedValues<["None", "Global"]>,
-  MarshallingInfoEnum, "Global">;
+  MarshallingInfoEnum, "Global">;
 // Note: This flag was introduced when it was necessary to distinguish between
 //   ABI for correct codegen.  This is no longer needed, but the flag is
 //   not removed since targeting either ABI will behave the same.
Index: clang/include/clang/Basic/CodeGenOptions.def
===
--- clang/include/clang/Basic/CodeGenOptions.def
+++ clang/include/clang/Basic/CodeGenOptions.def
@@ -219,7 +219,7 @@
 CODEGENOPT(SanitizeAddressUseOdrIndicator, 1, 0) ///< Enable ODR indicator 
globals
 CODEGENOPT(SanitizeMemoryTrackOrigins, 2, 0) ///< Enable tracking origins in
  ///< MemorySanitizer
-ENUM_CODEGENOPT(SanitizeAddressDtorKind, llvm::AsanDtorKind, 2,
+ENUM_CODEGENOPT(SanitizeAddressDtor, llvm::AsanDtorKind, 2,
 llvm::AsanDtorKind::Global)  ///< Set how ASan global
  ///< destructors are emitted.
 CODEGENOPT(SanitizeMemoryUseAfterDtor, 1, 0) ///< Enable use-after-delete 
detection


Index: clang/lib/CodeGen/BackendUtil.cpp
===
--- clang/lib/CodeGen/BackendUtil.cpp
+++ clang/lib/CodeGen/BackendUtil.cpp
@@ -287,7 +287,7 @@
   bool UseAfterScope = CGOpts.SanitizeAddressUseAfterScope;
   bool UseOdrIndicator = CGOpts.SanitizeAddressUseOdrIndicator;
   bool UseGlobalsGC = asanUseGlobalsGC(T, CGOpts);
-  llvm::AsanDtorKind DestructorKind = CGOpts.getSanitizeAddressDtorKind();
+  llvm::AsanDtorKind DestructorKind = CGOpts.getSanitizeAddressDtor();
   PM.add(createAddressSanitizerFunctionPass(/*CompileKernel*/ false, Recover,
 UseAfterScope));
   PM.add(createModuleAddressSanitizerLegacyPassPass(
@@ -1150,7 +1150,7 @@
 bool ModuleUseAfterScope = asanUseGlobalsGC(TargetTriple, CodeGenOpts);
 bool UseOdrIndicator = CodeGenOpts.SanitizeAddressUseOdrIndicator;
 llvm::AsanDtorKind DestructorKind =
-CodeGenOpts.getSanitizeAddressDtorKind();
+CodeGenOpts.getSanitizeAddressDtor();
 MPM.addPass(RequireAnalysisPass());
 MPM.addPass(ModuleAddressSanitizerPass(
 CompileKernel, Recover, ModuleUseAfterScope, UseOdrIndicator,
Index: clang/include/clang/Driver/Options.td
===
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -1548,7 +1548,7 @@
   Values<"none,global">,
   NormalizedValuesScope<"llvm::AsanDtorKind">,
   NormalizedValues<["None", "Global"]>,
-  MarshallingInfoEnum, "Global">;
+  MarshallingInfoEnum, "Global">;
 // Note: This flag was introduced when it was necessary to distinguish between
 //   ABI for 

[PATCH] D101490: [NFC] Rename SanitizeAddressDtorKind codegen opt to not have `Kind` suffix.

2021-04-28 Thread Dan Liew via Phabricator via cfe-commits
delcypher created this revision.
delcypher added a reviewer: vitalybuka.
Herald added subscribers: dexonsmith, dang.
delcypher requested review of this revision.
Herald added a project: clang.

This is post commit follow up based on discussions in
https://reviews.llvm.org/D101122.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101490

Files:
  clang/include/clang/Basic/CodeGenOptions.def
  clang/include/clang/Driver/Options.td
  clang/lib/CodeGen/BackendUtil.cpp


Index: clang/lib/CodeGen/BackendUtil.cpp
===
--- clang/lib/CodeGen/BackendUtil.cpp
+++ clang/lib/CodeGen/BackendUtil.cpp
@@ -287,7 +287,7 @@
   bool UseAfterScope = CGOpts.SanitizeAddressUseAfterScope;
   bool UseOdrIndicator = CGOpts.SanitizeAddressUseOdrIndicator;
   bool UseGlobalsGC = asanUseGlobalsGC(T, CGOpts);
-  llvm::AsanDtorKind DestructorKind = CGOpts.getSanitizeAddressDtorKind();
+  llvm::AsanDtorKind DestructorKind = CGOpts.getSanitizeAddressDtor();
   PM.add(createAddressSanitizerFunctionPass(/*CompileKernel*/ false, Recover,
 UseAfterScope));
   PM.add(createModuleAddressSanitizerLegacyPassPass(
@@ -1150,7 +1150,7 @@
 bool ModuleUseAfterScope = asanUseGlobalsGC(TargetTriple, CodeGenOpts);
 bool UseOdrIndicator = CodeGenOpts.SanitizeAddressUseOdrIndicator;
 llvm::AsanDtorKind DestructorKind =
-CodeGenOpts.getSanitizeAddressDtorKind();
+CodeGenOpts.getSanitizeAddressDtor();
 MPM.addPass(RequireAnalysisPass());
 MPM.addPass(ModuleAddressSanitizerPass(
 CompileKernel, Recover, ModuleUseAfterScope, UseOdrIndicator,
Index: clang/include/clang/Driver/Options.td
===
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -1548,7 +1548,7 @@
   Values<"none,global">,
   NormalizedValuesScope<"llvm::AsanDtorKind">,
   NormalizedValues<["None", "Global"]>,
-  MarshallingInfoEnum, "Global">;
+  MarshallingInfoEnum, "Global">;
 // Note: This flag was introduced when it was necessary to distinguish between
 //   ABI for correct codegen.  This is no longer needed, but the flag is
 //   not removed since targeting either ABI will behave the same.
Index: clang/include/clang/Basic/CodeGenOptions.def
===
--- clang/include/clang/Basic/CodeGenOptions.def
+++ clang/include/clang/Basic/CodeGenOptions.def
@@ -219,7 +219,7 @@
 CODEGENOPT(SanitizeAddressUseOdrIndicator, 1, 0) ///< Enable ODR indicator 
globals
 CODEGENOPT(SanitizeMemoryTrackOrigins, 2, 0) ///< Enable tracking origins in
  ///< MemorySanitizer
-ENUM_CODEGENOPT(SanitizeAddressDtorKind, llvm::AsanDtorKind, 2,
+ENUM_CODEGENOPT(SanitizeAddressDtor, llvm::AsanDtorKind, 2,
 llvm::AsanDtorKind::Global)  ///< Set how ASan global
  ///< destructors are emitted.
 CODEGENOPT(SanitizeMemoryUseAfterDtor, 1, 0) ///< Enable use-after-delete 
detection


Index: clang/lib/CodeGen/BackendUtil.cpp
===
--- clang/lib/CodeGen/BackendUtil.cpp
+++ clang/lib/CodeGen/BackendUtil.cpp
@@ -287,7 +287,7 @@
   bool UseAfterScope = CGOpts.SanitizeAddressUseAfterScope;
   bool UseOdrIndicator = CGOpts.SanitizeAddressUseOdrIndicator;
   bool UseGlobalsGC = asanUseGlobalsGC(T, CGOpts);
-  llvm::AsanDtorKind DestructorKind = CGOpts.getSanitizeAddressDtorKind();
+  llvm::AsanDtorKind DestructorKind = CGOpts.getSanitizeAddressDtor();
   PM.add(createAddressSanitizerFunctionPass(/*CompileKernel*/ false, Recover,
 UseAfterScope));
   PM.add(createModuleAddressSanitizerLegacyPassPass(
@@ -1150,7 +1150,7 @@
 bool ModuleUseAfterScope = asanUseGlobalsGC(TargetTriple, CodeGenOpts);
 bool UseOdrIndicator = CodeGenOpts.SanitizeAddressUseOdrIndicator;
 llvm::AsanDtorKind DestructorKind =
-CodeGenOpts.getSanitizeAddressDtorKind();
+CodeGenOpts.getSanitizeAddressDtor();
 MPM.addPass(RequireAnalysisPass());
 MPM.addPass(ModuleAddressSanitizerPass(
 CompileKernel, Recover, ModuleUseAfterScope, UseOdrIndicator,
Index: clang/include/clang/Driver/Options.td
===
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -1548,7 +1548,7 @@
   Values<"none,global">,
   NormalizedValuesScope<"llvm::AsanDtorKind">,
   NormalizedValues<["None", "Global"]>,
-  MarshallingInfoEnum, "Global">;
+  MarshallingInfoEnum, "Global">;
 // Note: This flag was introduced when it was necessary to distinguish between
 //   ABI for correct codegen.  This is no longer needed, but the