mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Move llvm/Analysis/ObjCARCUtil.h to IR to fix layering.
This is included from IR files, and IR doesn't/can't depend on Analysis (because Analysis depends on IR). Also fix the implementation - don't use non-member static in headers, as it leads to ODR violations, inaccurate "unused function" warnings, etc. And fix the header protection macro name (we don't generally include "LIB" in the names, so far as I can tell).
This commit is contained in:
parent
9bd7831b75
commit
2677513543
@ -11,8 +11,8 @@
|
||||
///
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_LIB_ANALYSIS_OBJCARCUTIL_H
|
||||
#define LLVM_LIB_ANALYSIS_OBJCARCUTIL_H
|
||||
#ifndef LLVM_IR_OBJCARCUTIL_H
|
||||
#define LLVM_IR_OBJCARCUTIL_H
|
||||
|
||||
#include "llvm/IR/InstrTypes.h"
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
@ -20,18 +20,18 @@
|
||||
namespace llvm {
|
||||
namespace objcarc {
|
||||
|
||||
static inline const char *getRVMarkerModuleFlagStr() {
|
||||
inline const char *getRVMarkerModuleFlagStr() {
|
||||
return "clang.arc.retainAutoreleasedReturnValueMarker";
|
||||
}
|
||||
|
||||
enum AttachedCallOperandBundle : unsigned { RVOB_Retain, RVOB_Claim };
|
||||
|
||||
static AttachedCallOperandBundle
|
||||
inline AttachedCallOperandBundle
|
||||
getAttachedCallOperandBundleEnum(bool IsRetain) {
|
||||
return IsRetain ? RVOB_Retain : RVOB_Claim;
|
||||
}
|
||||
|
||||
static inline bool hasAttachedCallOpBundle(const CallBase *CB, bool IsRetain) {
|
||||
inline bool hasAttachedCallOpBundle(const CallBase *CB, bool IsRetain) {
|
||||
auto B = CB->getOperandBundle(LLVMContext::OB_clang_arc_attachedcall);
|
||||
if (!B.hasValue())
|
||||
return false;
|
||||
@ -39,7 +39,7 @@ static inline bool hasAttachedCallOpBundle(const CallBase *CB, bool IsRetain) {
|
||||
getAttachedCallOperandBundleEnum(IsRetain);
|
||||
}
|
||||
|
||||
static inline bool hasAttachedCallOpBundle(const CallBase *CB) {
|
||||
inline bool hasAttachedCallOpBundle(const CallBase *CB) {
|
||||
return CB->getOperandBundle(LLVMContext::OB_clang_arc_attachedcall)
|
||||
.hasValue();
|
||||
}
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include "llvm/IR/AutoUpgrade.h"
|
||||
#include "llvm/ADT/StringSwitch.h"
|
||||
#include "llvm/Analysis/ObjCARCUtil.h"
|
||||
#include "llvm/IR/ObjCARCUtil.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/DIBuilder.h"
|
||||
#include "llvm/IR/DebugInfo.h"
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/ADT/Twine.h"
|
||||
#include "llvm/Analysis/ObjCARCUtil.h"
|
||||
#include "llvm/IR/ObjCARCUtil.h"
|
||||
#include "llvm/Analysis/VectorUtils.h"
|
||||
#include "llvm/CodeGen/CallingConvLower.h"
|
||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include "ObjCARC.h"
|
||||
#include "llvm-c/Initialization.h"
|
||||
#include "llvm/Analysis/ObjCARCUtil.h"
|
||||
#include "llvm/IR/ObjCARCUtil.h"
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
#include "llvm/IR/InlineAsm.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "ARCRuntimeEntryPoints.h"
|
||||
#include "llvm/Analysis/EHPersonalities.h"
|
||||
#include "llvm/Analysis/ObjCARCAnalysisUtils.h"
|
||||
#include "llvm/Analysis/ObjCARCUtil.h"
|
||||
#include "llvm/IR/ObjCARCUtil.h"
|
||||
#include "llvm/Transforms/Utils/Local.h"
|
||||
|
||||
namespace llvm {
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/EHPersonalities.h"
|
||||
#include "llvm/Analysis/ObjCARCUtil.h"
|
||||
#include "llvm/IR/ObjCARCUtil.h"
|
||||
#include "llvm/IR/Dominators.h"
|
||||
#include "llvm/IR/InlineAsm.h"
|
||||
#include "llvm/IR/InstIterator.h"
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include "llvm/Analysis/ObjCARCAliasAnalysis.h"
|
||||
#include "llvm/Analysis/ObjCARCAnalysisUtils.h"
|
||||
#include "llvm/Analysis/ObjCARCInstKind.h"
|
||||
#include "llvm/Analysis/ObjCARCUtil.h"
|
||||
#include "llvm/IR/ObjCARCUtil.h"
|
||||
#include "llvm/IR/BasicBlock.h"
|
||||
#include "llvm/IR/CFG.h"
|
||||
#include "llvm/IR/Constant.h"
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "ObjCARC.h"
|
||||
#include "llvm/Analysis/ObjCARCAnalysisUtils.h"
|
||||
#include "llvm/Analysis/ObjCARCInstKind.h"
|
||||
#include "llvm/Analysis/ObjCARCUtil.h"
|
||||
#include "llvm/IR/ObjCARCUtil.h"
|
||||
#include "llvm/IR/BasicBlock.h"
|
||||
#include "llvm/IR/Instruction.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "llvm/Analysis/EHPersonalities.h"
|
||||
#include "llvm/Analysis/InstructionSimplify.h"
|
||||
#include "llvm/Analysis/ObjCARCAnalysisUtils.h"
|
||||
#include "llvm/Analysis/ObjCARCUtil.h"
|
||||
#include "llvm/IR/ObjCARCUtil.h"
|
||||
#include "llvm/Analysis/ProfileSummaryInfo.h"
|
||||
#include "llvm/Analysis/ValueTracking.h"
|
||||
#include "llvm/Analysis/VectorUtils.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user