Fix layering after ed4718eccb.

That commit added a dependency from IR to Analysis, which isn't
allowed. Fix it by duplicating a string constant.
This commit is contained in:
James Y Knight 2021-02-12 14:53:18 -05:00
parent 5d6d9b63a3
commit 3c06676de1

View File

@ -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);