Author: Akira Hatanaka
Date: 2021-03-08T16:35:24-08:00
New Revision: dca5737945b9a52d0c66c7ec0cbaa2e15ada69cf

URL: 
https://github.com/llvm/llvm-project/commit/dca5737945b9a52d0c66c7ec0cbaa2e15ada69cf
DIFF: 
https://github.com/llvm/llvm-project/commit/dca5737945b9a52d0c66c7ec0cbaa2e15ada69cf.diff

LOG: Move ObjCARCUtil.h back to llvm/Analysis

Instead of adding the header to llvm/IR, just duplicate the marker
string in the auto upgrader.

Added: 
    llvm/include/llvm/Analysis/ObjCARCUtil.h

Modified: 
    clang/lib/CodeGen/CGObjC.cpp
    llvm/lib/IR/AutoUpgrade.cpp
    llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    llvm/lib/Transforms/ObjCARC/ObjCARC.cpp
    llvm/lib/Transforms/ObjCARC/ObjCARC.h
    llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
    llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
    llvm/lib/Transforms/ObjCARC/PtrState.cpp
    llvm/lib/Transforms/Utils/InlineFunction.cpp

Removed: 
    llvm/include/llvm/IR/ObjCARCUtil.h


################################################################################
diff  --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp
index a5d19291e722..663666b6bf8b 100644
--- a/clang/lib/CodeGen/CGObjC.cpp
+++ b/clang/lib/CodeGen/CGObjC.cpp
@@ -23,7 +23,7 @@
 #include "clang/Basic/Diagnostic.h"
 #include "clang/CodeGen/CGFunctionInfo.h"
 #include "llvm/ADT/STLExtras.h"
-#include "llvm/IR/ObjCARCUtil.h"
+#include "llvm/Analysis/ObjCARCUtil.h"
 #include "llvm/BinaryFormat/MachO.h"
 #include "llvm/IR/DataLayout.h"
 #include "llvm/IR/InlineAsm.h"

diff  --git a/llvm/include/llvm/IR/ObjCARCUtil.h 
b/llvm/include/llvm/Analysis/ObjCARCUtil.h
similarity index 100%
rename from llvm/include/llvm/IR/ObjCARCUtil.h
rename to llvm/include/llvm/Analysis/ObjCARCUtil.h

diff  --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index 06268c6eab7a..e0d152b5ec21 100644
--- a/llvm/lib/IR/AutoUpgrade.cpp
+++ b/llvm/lib/IR/AutoUpgrade.cpp
@@ -14,7 +14,6 @@
 
 #include "llvm/IR/AutoUpgrade.h"
 #include "llvm/ADT/StringSwitch.h"
-#include "llvm/IR/ObjCARCUtil.h"
 #include "llvm/IR/Constants.h"
 #include "llvm/IR/DIBuilder.h"
 #include "llvm/IR/DebugInfo.h"
@@ -4039,7 +4038,7 @@ bool llvm::UpgradeDebugInfo(Module &M) {
 /// returns true if module is modified.
 static bool UpgradeRetainReleaseMarker(Module &M) {
   bool Changed = false;
-  const char *MarkerKey = objcarc::getRVMarkerModuleFlagStr();
+  const char *MarkerKey = "clang.arc.retainAutoreleasedReturnValueMarker";
   NamedMDNode *ModRetainReleaseMarker = M.getNamedMetadata(MarkerKey);
   if (ModRetainReleaseMarker) {
     MDNode *Op = ModRetainReleaseMarker->getOperand(0);

diff  --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp 
b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 105dfe45bc97..67ec46f49671 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -29,7 +29,7 @@
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/Triple.h"
 #include "llvm/ADT/Twine.h"
-#include "llvm/IR/ObjCARCUtil.h"
+#include "llvm/Analysis/ObjCARCUtil.h"
 #include "llvm/Analysis/VectorUtils.h"
 #include "llvm/CodeGen/CallingConvLower.h"
 #include "llvm/CodeGen/MachineBasicBlock.h"

diff  --git a/llvm/lib/Transforms/ObjCARC/ObjCARC.cpp 
b/llvm/lib/Transforms/ObjCARC/ObjCARC.cpp
index e1bee811d68e..06b12149f597 100644
--- a/llvm/lib/Transforms/ObjCARC/ObjCARC.cpp
+++ b/llvm/lib/Transforms/ObjCARC/ObjCARC.cpp
@@ -14,7 +14,7 @@
 
 #include "ObjCARC.h"
 #include "llvm-c/Initialization.h"
-#include "llvm/IR/ObjCARCUtil.h"
+#include "llvm/Analysis/ObjCARCUtil.h"
 #include "llvm/IR/IRBuilder.h"
 #include "llvm/IR/InlineAsm.h"
 #include "llvm/IR/Instructions.h"

diff  --git a/llvm/lib/Transforms/ObjCARC/ObjCARC.h 
b/llvm/lib/Transforms/ObjCARC/ObjCARC.h
index 45ce1881ff44..1f9d76969bfd 100644
--- a/llvm/lib/Transforms/ObjCARC/ObjCARC.h
+++ b/llvm/lib/Transforms/ObjCARC/ObjCARC.h
@@ -25,7 +25,7 @@
 #include "ARCRuntimeEntryPoints.h"
 #include "llvm/Analysis/EHPersonalities.h"
 #include "llvm/Analysis/ObjCARCAnalysisUtils.h"
-#include "llvm/IR/ObjCARCUtil.h"
+#include "llvm/Analysis/ObjCARCUtil.h"
 #include "llvm/Transforms/Utils/Local.h"
 
 namespace llvm {

diff  --git a/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp 
b/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
index c9c3fa2993ed..62161b5b6b40 100644
--- a/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
+++ b/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
@@ -32,7 +32,7 @@
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Analysis/AliasAnalysis.h"
 #include "llvm/Analysis/EHPersonalities.h"
-#include "llvm/IR/ObjCARCUtil.h"
+#include "llvm/Analysis/ObjCARCUtil.h"
 #include "llvm/IR/Dominators.h"
 #include "llvm/IR/InlineAsm.h"
 #include "llvm/IR/InstIterator.h"

diff  --git a/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp 
b/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
index e0abafed0c89..0769d466be93 100644
--- a/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
+++ b/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
@@ -41,7 +41,7 @@
 #include "llvm/Analysis/ObjCARCAliasAnalysis.h"
 #include "llvm/Analysis/ObjCARCAnalysisUtils.h"
 #include "llvm/Analysis/ObjCARCInstKind.h"
-#include "llvm/IR/ObjCARCUtil.h"
+#include "llvm/Analysis/ObjCARCUtil.h"
 #include "llvm/IR/BasicBlock.h"
 #include "llvm/IR/CFG.h"
 #include "llvm/IR/Constant.h"

diff  --git a/llvm/lib/Transforms/ObjCARC/PtrState.cpp 
b/llvm/lib/Transforms/ObjCARC/PtrState.cpp
index c15b23a1c2d6..d10d5851d5ea 100644
--- a/llvm/lib/Transforms/ObjCARC/PtrState.cpp
+++ b/llvm/lib/Transforms/ObjCARC/PtrState.cpp
@@ -11,7 +11,7 @@
 #include "ObjCARC.h"
 #include "llvm/Analysis/ObjCARCAnalysisUtils.h"
 #include "llvm/Analysis/ObjCARCInstKind.h"
-#include "llvm/IR/ObjCARCUtil.h"
+#include "llvm/Analysis/ObjCARCUtil.h"
 #include "llvm/IR/BasicBlock.h"
 #include "llvm/IR/Instruction.h"
 #include "llvm/IR/Instructions.h"

diff  --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp 
b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index 2745e0e9d793..5f75ead1247b 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -28,7 +28,7 @@
 #include "llvm/Analysis/EHPersonalities.h"
 #include "llvm/Analysis/InstructionSimplify.h"
 #include "llvm/Analysis/ObjCARCAnalysisUtils.h"
-#include "llvm/IR/ObjCARCUtil.h"
+#include "llvm/Analysis/ObjCARCUtil.h"
 #include "llvm/Analysis/ProfileSummaryInfo.h"
 #include "llvm/Analysis/ValueTracking.h"
 #include "llvm/Analysis/VectorUtils.h"


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to