From 515a60daff46d2a227f42d01da299b54aa232e84 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 16 Feb 2012 00:57:37 +0000 Subject: Teach clang to add metadata tags to calls and invokes in ObjC with -fno-objc-arc-exceptions. This will allow the optimizer to perform optimizations which are only safe under that flag. This is a part of rdar://10803830. llvm-svn: 150644 --- clang/lib/CodeGen/CodeGenModule.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'clang/lib/CodeGen/CodeGenModule.h') diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 6813edd..9b6931d 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -233,6 +233,7 @@ class CodeGenModule : public CodeGenTypeCache { CGCUDARuntime* CUDARuntime; CGDebugInfo* DebugInfo; ARCEntrypoints *ARCData; + llvm::MDNode *NoObjCARCExceptionsMetadata; RREntrypoints *RRData; // WeakRefReferences - A set of references that have only been seen via @@ -421,6 +422,14 @@ public: CGDebugInfo *getModuleDebugInfo() { return DebugInfo; } + llvm::MDNode *getNoObjCARCExceptionsMetadata() { + if (!NoObjCARCExceptionsMetadata) + NoObjCARCExceptionsMetadata = + llvm::MDNode::get(getLLVMContext(), + SmallVector()); + return NoObjCARCExceptionsMetadata; + } + ASTContext &getContext() const { return Context; } const CodeGenOptions &getCodeGenOpts() const { return CodeGenOpts; } const LangOptions &getLangOptions() const { return Features; } -- cgit v1.1