[llvm] 3c06676 - Fix layering after ed4718eccb12.

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 12 11:55:11 PST 2021


Author: James Y Knight
Date: 2021-02-12T14:54:59-05:00
New Revision: 3c06676de14d7dd6dc3d1bf2989c503a2a5d438a

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

LOG: Fix layering after ed4718eccb12.

That commit added a dependency from IR to Analysis, which isn't
allowed. Fix it by duplicating a string constant.

Added: 
    

Modified: 
    llvm/lib/IR/AutoUpgrade.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index 3134f7b15103..21a97cd50492 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/Analysis/ObjCARCUtil.h"
 #include "llvm/IR/Constants.h"
 #include "llvm/IR/DIBuilder.h"
 #include "llvm/IR/DebugInfo.h"
@@ -3997,7 +3996,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);


        


More information about the llvm-commits mailing list