reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

include/llvm/IR/IRBuilder.h
 1113     return MetadataAsValue::get(Context, RoundingMDS);
 1129     return MetadataAsValue::get(Context, ExceptMDS);
include/llvm/IR/IntrinsicInst.h
  109       return cast<MetadataAsValue>(getArgOperand(1))->getMetadata();
  113       return cast<MetadataAsValue>(getArgOperand(2))->getMetadata();
  194       return cast<MetadataAsValue>(getArgOperand(0))->getMetadata();
include/llvm/IR/Metadata.h
  187   static MetadataAsValue *get(LLVMContext &Context, Metadata *MD);
  188   static MetadataAsValue *getIfExists(LLVMContext &Context, Metadata *MD);
  238   static bool track(void *Ref, Metadata &MD, MetadataAsValue &Owner) {
  264   using OwnerTy = PointerUnion<MetadataAsValue *, Metadata *>;
include/llvm/Support/Casting.h
   58     return To::classof(&Val);
   77     return isa_impl<To, From>::doit(Val);
   92     return isa_impl<To, From>::doit(*Val);
  106     return isa_impl<To, From>::doit(*Val);
  122     return isa_impl_wrap<To, SimpleFrom,
  132     return isa_impl_cl<To,FromTy>::doit(Val);
  142   return isa_impl_wrap<X, const Y,
  172   using ret_type = To *;       // Pointer arg case, return Ty*
  176   using ret_type = const To *; // Constant pointer arg case, return const Ty*
  198   using ret_type = typename cast_retty<To, SimpleFrom>::ret_type;
  204   using ret_type = typename cast_retty_impl<To,FromTy>::ret_type;
  210       To, From, typename simplify_type<From>::SimpleType>::ret_type;
  218   static typename cast_retty<To, From>::ret_type doit(From &Val) {
  219     return cast_convert_val<To, SimpleFrom,
  227   static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
  228     typename cast_retty<To, FromTy>::ret_type Res2
  248                                typename cast_retty<X, const Y>::ret_type>::type
  252       X, const Y, typename simplify_type<const Y>::SimpleType>::doit(Val);
  256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  265   return cast_convert_val<X, Y*,
  331                             typename cast_retty<X, const Y>::ret_type>::type
  337 LLVM_NODISCARD inline typename cast_retty<X, Y>::ret_type dyn_cast(Y &Val) {
  342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
  343   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  343   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  352                             typename cast_retty<X, const Y>::ret_type>::type
  354   return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
  354   return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
  360                             typename cast_retty<X, Y>::ret_type>::type
  366 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
  368   return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
  368   return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
include/llvm/Support/PointerLikeTypeTraits.h
   56   static inline void *getAsVoidPointer(T *P) { return P; }
   57   static inline T *getFromVoidPointer(void *P) { return static_cast<T *>(P); }
   59   enum { NumLowBitsAvailable = detail::ConstantLog2<alignof(T)>::value };
lib/Analysis/ModuleSummaryAnalysis.cpp
  169     auto *TypeMDVal = cast<MetadataAsValue>(CI->getArgOperand(1));
  169     auto *TypeMDVal = cast<MetadataAsValue>(CI->getArgOperand(1));
  200     auto *TypeMDVal = cast<MetadataAsValue>(CI->getArgOperand(2));
  200     auto *TypeMDVal = cast<MetadataAsValue>(CI->getArgOperand(2));
lib/AsmParser/LLParser.cpp
 5058   V = MetadataAsValue::get(Context, MD);
lib/Bitcode/Reader/BitcodeReader.cpp
  630       return MetadataAsValue::get(Ty->getContext(), getFnMetadataByID(ID));
lib/Bitcode/Reader/MetadataLoader.cpp
  543               DDI->setOperand(2, MetadataAsValue::get(Context, E));
lib/Bitcode/Writer/ValueEnumerator.cpp
  404           auto *MD = dyn_cast<MetadataAsValue>(&Op);
  404           auto *MD = dyn_cast<MetadataAsValue>(&Op);
  458   if (auto *MD = dyn_cast<MetadataAsValue>(V))
  984         if (auto *MD = dyn_cast<MetadataAsValue>(&OI))
  984         if (auto *MD = dyn_cast<MetadataAsValue>(&OI))
lib/CodeGen/CodeGenPrepare.cpp
 2558         auto *MV = MetadataAsValue::get(Ctx, ValueAsMetadata::get(Inst));
 2558         auto *MV = MetadataAsValue::get(Ctx, ValueAsMetadata::get(Inst));
lib/CodeGen/GlobalISel/IRTranslator.cpp
 1628     if (isa<MetadataAsValue>(Arg.value()))
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
 5676         DAG.getMDNode(cast<MDNode>(cast<MetadataAsValue>(Reg)->getMetadata()));
 5689         DAG.getMDNode(cast<MDNode>(cast<MetadataAsValue>(Reg)->getMetadata()));
 6437     Metadata *MD = cast<MetadataAsValue>(I.getArgOperand(0))->getMetadata();
lib/IR/AsmWriter.cpp
  333   if (const auto *MAV = dyn_cast<MetadataAsValue>(V)) {
  333   if (const auto *MAV = dyn_cast<MetadataAsValue>(V)) {
 1072           if (auto *V = dyn_cast_or_null<MetadataAsValue>(Op))
 1072           if (auto *V = dyn_cast_or_null<MetadataAsValue>(Op))
 2258   if (auto *MD = dyn_cast<MetadataAsValue>(V)) {
 4274           if (auto *V = dyn_cast_or_null<MetadataAsValue>(Op))
 4274           if (auto *V = dyn_cast_or_null<MetadataAsValue>(Op))
 4284   else if (isa<Function>(this) || isa<MetadataAsValue>(this))
 4318   } else if (const MetadataAsValue *V = dyn_cast<MetadataAsValue>(this)) {
 4318   } else if (const MetadataAsValue *V = dyn_cast<MetadataAsValue>(this)) {
 4338       (!isa<Constant>(V) && !isa<MetadataAsValue>(V))) {
 4367       M, /* ShouldInitializeAllMetadata */ isa<MetadataAsValue>(this));
lib/IR/Core.cpp
  867     return wrap(MetadataAsValue::get(I->getContext(), MD));
  874 static MDNode *extractMDNode(MetadataAsValue *MAV) {
  886   MDNode *N = Val ? extractMDNode(unwrap<MetadataAsValue>(Val)) : nullptr;
  933   if (auto *MD = dyn_cast_or_null<MetadataAsValue>(unwrap(Val)))
  933   if (auto *MD = dyn_cast_or_null<MetadataAsValue>(unwrap(Val)))
  941   if (auto *MD = dyn_cast_or_null<MetadataAsValue>(unwrap(Val)))
  941   if (auto *MD = dyn_cast_or_null<MetadataAsValue>(unwrap(Val)))
  980   return wrap(MetadataAsValue::get(Context, Op));
  985   if (auto *MD = dyn_cast<MetadataAsValue>(V)) {
  985   if (auto *MD = dyn_cast<MetadataAsValue>(V)) {
 1008   if (isa<MetadataAsValue>(V))
 1061   return wrap(MetadataAsValue::get(
 1080     else if (auto *MDV = dyn_cast<MetadataAsValue>(V)) {
 1080     else if (auto *MDV = dyn_cast<MetadataAsValue>(V)) {
 1088       return wrap(MetadataAsValue::get(Context, LocalAsMetadata::get(V)));
 1093   return wrap(MetadataAsValue::get(Context, MDNode::get(Context, MDs)));
 1101   return wrap(MetadataAsValue::get(*unwrap(C), unwrap(MD)));
 1108   if (auto *MAV = dyn_cast<MetadataAsValue>(V))
 1108   if (auto *MAV = dyn_cast<MetadataAsValue>(V))
 1114   if (const auto *MD = dyn_cast<MetadataAsValue>(unwrap(V)))
 1114   if (const auto *MD = dyn_cast<MetadataAsValue>(unwrap(V)))
 1124   auto *MD = cast<MetadataAsValue>(unwrap(V));
 1124   auto *MD = cast<MetadataAsValue>(unwrap(V));
 1179   auto *MD = cast<MetadataAsValue>(unwrap(V));
 1179   auto *MD = cast<MetadataAsValue>(unwrap(V));
 1205     Dest[i] = wrap(MetadataAsValue::get(Context, N->getOperand(i)));
 1215   N->addOperand(extractMDNode(unwrap<MetadataAsValue>(Val)));
 3048       L ? cast<MDNode>(unwrap<MetadataAsValue>(L)->getMetadata()) : nullptr;
 3054   return wrap(MetadataAsValue::get(
lib/IR/DIBuilder.cpp
  911   return MetadataAsValue::get(VMContext, ValueAsMetadata::get(V));
  933                    MetadataAsValue::get(VMContext, VarInfo),
  934                    MetadataAsValue::get(VMContext, Expr)};
  955                    MetadataAsValue::get(VMContext, VarInfo),
  956                    MetadataAsValue::get(VMContext, Expr)};
  974   Value *Args[] = {MetadataAsValue::get(VMContext, LabelInfo)};
lib/IR/IntrinsicInst.cpp
   44   auto *MD = cast<MetadataAsValue>(Op)->getMetadata();
  109       cast<MetadataAsValue>(getArgOperand(NumOperands - 2))->getMetadata();
  155       cast<MetadataAsValue>(getArgOperand(NumOperands - 1))->getMetadata();
lib/IR/LLVMContextImpl.cpp
  130     SmallVector<MetadataAsValue *, 8> MDVs;
  135     for (auto *V : MDVs)
lib/IR/LLVMContextImpl.h
 1274   DenseMap<Metadata *, MetadataAsValue *> MetadataAsValues;
lib/IR/Metadata.cpp
  105 MetadataAsValue *MetadataAsValue::get(LLVMContext &Context, Metadata *MD) {
  107   auto *&Entry = Context.pImpl->MetadataAsValues[MD];
  109     Entry = new MetadataAsValue(Type::getMetadataTy(Context), MD);
  113 MetadataAsValue *MetadataAsValue::getIfExists(LLVMContext &Context,
  131   auto *&Entry = Store[MD];
  260     if (Owner.is<MetadataAsValue *>()) {
  261       Owner.get<MetadataAsValue *>()->handleChangedMetadata(MD);
  300     if (Owner.is<MetadataAsValue *>())
lib/IR/TypeFinder.cpp
  121   if (const auto *M = dyn_cast<MetadataAsValue>(V)) {
  121   if (const auto *M = dyn_cast<MetadataAsValue>(V)) {
lib/IR/Verifier.cpp
  407   void visitMetadataAsValue(const MetadataAsValue &MD, Function *F);
  852 void Verifier::visitMetadataAsValue(const MetadataAsValue &MDV, Function *F) {
 4280     if (auto *MD = dyn_cast<MetadataAsValue>(V))
 4280     if (auto *MD = dyn_cast<MetadataAsValue>(V))
 4917   auto *MD = cast<MetadataAsValue>(DII.getArgOperand(0))->getMetadata();
lib/Target/AArch64/AArch64StackTagging.cpp
  684           MetadataAsValue::get(F->getContext(), LocalAsMetadata::get(Info.AI)));
lib/Transforms/IPO/CrossDSOCFI.cpp
  149         BitsetTestFn, {&Addr, MetadataAsValue::get(
lib/Transforms/IPO/GlobalDCE.cpp
  246     auto *TypeId = cast<MetadataAsValue>(TypeIdValue)->getMetadata();
lib/Transforms/IPO/Inliner.cpp
  225         if (auto *MDV = MetadataAsValue::getIfExists(AI->getContext(), L))
  225         if (auto *MDV = MetadataAsValue::getIfExists(AI->getContext(), L))
lib/Transforms/IPO/LowerTypeTests.cpp
 1027   auto TypeIdMDVal = dyn_cast<MetadataAsValue>(CI->getArgOperand(1));
 2002       auto TypeIdMDVal = dyn_cast<MetadataAsValue>(CI->getArgOperand(1));
lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
   90         cast<MetadataAsValue>(CI->getArgOperand(ArgNo))->getMetadata();
  100                         MetadataAsValue::get(M.getContext(), GlobalMD));
lib/Transforms/IPO/WholeProgramDevirt.cpp
 1575           cast<MetadataAsValue>(CI->getArgOperand(1))->getMetadata();
 1612     Metadata *TypeId = cast<MetadataAsValue>(TypeIdValue)->getMetadata();
lib/Transforms/InstCombine/InstCombineCalls.cpp
 3693         Value *Args[] = {MetadataAsValue::get(II->getContext(), MD)};
lib/Transforms/InstCombine/InstructionCombining.cpp
 3175             0, MetadataAsValue::get(I->getContext(),
 3192         DII->setOperand(0, MetadataAsValue::get(DII->getContext(),
lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
 1025   Value *Args[] = {MetadataAsValue::get(*C, MD)};
 1069       DDI->setArgOperand(2, MetadataAsValue::get(*C, NewExpr));
 1218                   0, MetadataAsValue::get(*C, LocalAsMetadata::get(NewAI)));
lib/Transforms/Utils/LCSSA.cpp
  232         DVI->setOperand(0, MetadataAsValue::get(Ctx, ValueAsMetadata::get(V)));
lib/Transforms/Utils/Local.cpp
  494     DII->setOperand(0, MetadataAsValue::get(DII->getContext(),
 1474     auto PhiMAV = MetadataAsValue::get(C, ValueAsMetadata::get(PHI));
 1500   auto *MDV = MetadataAsValue::getIfExists(V->getContext(), L);
 1500   auto *MDV = MetadataAsValue::getIfExists(V->getContext(), L);
 1520     if (auto *MDV = MetadataAsValue::getIfExists(V->getContext(), L))
 1520     if (auto *MDV = MetadataAsValue::getIfExists(V->getContext(), L))
 1533     if (auto *MDV = MetadataAsValue::getIfExists(V->getContext(), L))
 1533     if (auto *MDV = MetadataAsValue::getIfExists(V->getContext(), L))
 1592     if (auto *MDV = MetadataAsValue::getIfExists(AI->getContext(), L))
 1592     if (auto *MDV = MetadataAsValue::getIfExists(AI->getContext(), L))
 1601 static MetadataAsValue *wrapValueInMetadata(LLVMContext &C, Value *V) {
 1602   return MetadataAsValue::get(C, ValueAsMetadata::get(V));
 1634     DII->setOperand(2, MetadataAsValue::get(Ctx, DIExpr));
 1774     DII->setOperand(2, MetadataAsValue::get(Ctx, *DVR));
lib/Transforms/Utils/LoopRotationUtils.cpp
  167                            MetadataAsValue::get(OrigHeaderVal->getContext(),
lib/Transforms/Utils/LoopUnroll.cpp
   73     if (auto *V = dyn_cast<MetadataAsValue>(Op))
   73     if (auto *V = dyn_cast<MetadataAsValue>(Op))
   81       return Wrapped ? MetadataAsValue::get(C, ValueAsMetadata::get(V)) : V;
lib/Transforms/Utils/ValueMapper.cpp
  378   if (const auto *MDV = dyn_cast<MetadataAsValue>(V)) {
  378   if (const auto *MDV = dyn_cast<MetadataAsValue>(V)) {
  386         return MetadataAsValue::get(V->getContext(), ValueAsMetadata::get(LV));
  393                  : MetadataAsValue::get(V->getContext(),
  406     return getVM()[V] = MetadataAsValue::get(V->getContext(), MappedMD);
tools/clang/lib/CodeGen/Address.h
  108 template <class U> inline U cast(CodeGen::Address addr) {
tools/clang/lib/CodeGen/CGBuiltin.cpp
 3130     Builder.CreateCall(F, MetadataAsValue::get(getLLVMContext(), StrTuple));
 5931   llvm::Value *Metadata = llvm::MetadataAsValue::get(Context, RegName);
 7257     llvm::Value *Metadata = llvm::MetadataAsValue::get(Context, RegName);
 7430     llvm::Value *Metadata = llvm::MetadataAsValue::get(Context, RegName);
tools/clang/lib/CodeGen/CGClass.cpp
 2648         llvm::MetadataAsValue::get(CGM.getLLVMContext(), MD);
 2756   llvm::Value *TypeId = llvm::MetadataAsValue::get(getLLVMContext(), MD);
 2779   llvm::Value *AllVtables = llvm::MetadataAsValue::get(
 2813   llvm::Value *TypeId = llvm::MetadataAsValue::get(CGM.getLLVMContext(), MD);
tools/clang/lib/CodeGen/CGExpr.cpp
 1906       cast<llvm::MetadataAsValue>(LV.getGlobalReg())->getMetadata());
 1917       F, llvm::MetadataAsValue::get(Ty->getContext(), RegName));
 2166       cast<llvm::MetadataAsValue>(Dst.getGlobalReg())->getMetadata());
 2181       F, {llvm::MetadataAsValue::get(Ty->getContext(), RegName), Value});
 2459     llvm::MetadataAsValue::get(CGM.getLLVMContext(), M->getOperand(0));
 3237   llvm::Value *AllVtables = llvm::MetadataAsValue::get(
 4853     llvm::Value *TypeId = llvm::MetadataAsValue::get(getLLVMContext(), MD);
tools/clang/lib/CodeGen/ItaniumCXXABI.cpp
  667       TypeId = llvm::MetadataAsValue::get(CGF.getLLVMContext(), MD);
  715         llvm::Value *AllVtables = llvm::MetadataAsValue::get(
  758             llvm::MetadataAsValue::get(CGF.getLLVMContext(), MD);
tools/polly/lib/Support/VirtualInstruction.cpp
   59   if (isa<llvm::Constant>(Val) || isa<MetadataAsValue>(Val))
unittests/IR/BasicBlockTest.cpp
  106   Value *DIV = MetadataAsValue::get(Ctx, (Metadata *)nullptr);
unittests/IR/MetadataTest.cpp
  383   auto *MAV0 = MetadataAsValue::get(Context, N0);
  383   auto *MAV0 = MetadataAsValue::get(Context, N0);
  384   auto *MAV1 = MetadataAsValue::get(Context, N1);
  384   auto *MAV1 = MetadataAsValue::get(Context, N1);
 2486   auto *V = MetadataAsValue::get(Context, N);
 2486   auto *V = MetadataAsValue::get(Context, N);
 2490   auto *V2 = MetadataAsValue::get(Context, N);
 2490   auto *V2 = MetadataAsValue::get(Context, N);
 2498   auto *V = MetadataAsValue::get(Context, N2);
 2498   auto *V = MetadataAsValue::get(Context, N2);
 2502   auto *V2 = MetadataAsValue::get(Context, N2);
 2502   auto *V2 = MetadataAsValue::get(Context, N2);
 2505   auto *V3 = MetadataAsValue::get(Context, N);
 2505   auto *V3 = MetadataAsValue::get(Context, N);
 2517   auto *V = MetadataAsValue::get(Context, MD);
 2517   auto *V = MetadataAsValue::get(Context, MD);
 2521   auto *V2 = MetadataAsValue::get(Context, N);
 2521   auto *V2 = MetadataAsValue::get(Context, N);
unittests/Linker/LinkModulesTest.cpp
  266       cast<MDNode>(cast<MetadataAsValue>(CI->getArgOperand(0))->getMetadata());
unittests/Transforms/Utils/ValueMapperTest.cpp
  294   auto *MAV = MetadataAsValue::get(C, LAM);
  294   auto *MAV = MetadataAsValue::get(C, LAM);
  306   auto *N0AV = MetadataAsValue::get(C, N0);
  306   auto *N0AV = MetadataAsValue::get(C, N0);
  341   auto *MDA = MetadataAsValue::get(Context, ValueAsMetadata::get(&A));
  341   auto *MDA = MetadataAsValue::get(Context, ValueAsMetadata::get(&A));
  342   auto *MDC = MetadataAsValue::get(Context, ValueAsMetadata::get(&C));
  342   auto *MDC = MetadataAsValue::get(Context, ValueAsMetadata::get(&C));
utils/unittest/googletest/include/gtest/gtest-printers.h
  407                     T* p, ::std::ostream* os) {
  416     if (IsTrue(ImplicitlyConvertible<T*, const void*>::value)) {