diff options
Diffstat (limited to 'llvm/lib/IR/LLVMContext.cpp')
-rw-r--r-- | llvm/lib/IR/LLVMContext.cpp | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp index 4f292101256d..c4a713db455b 100644 --- a/llvm/lib/IR/LLVMContext.cpp +++ b/llvm/lib/IR/LLVMContext.cpp @@ -78,6 +78,12 @@ LLVMContext::LLVMContext() : pImpl(new LLVMContextImpl(*this)) { "gc-transition operand bundle id drifted!"); (void)GCLiveEntry; + auto *ClangAttachedCall = + pImpl->getOrInsertBundleTag("clang.arc.attachedcall"); + assert(ClangAttachedCall->second == LLVMContext::OB_clang_arc_attachedcall && + "clang.arc.attachedcall operand bundle id drifted!"); + (void)ClangAttachedCall; + SyncScope::ID SingleThreadSSID = pImpl->getOrInsertSyncScopeID("singlethread"); assert(SingleThreadSSID == SyncScope::SingleThread && @@ -105,26 +111,6 @@ void LLVMContext::removeModule(Module *M) { // Recoverable Backend Errors //===----------------------------------------------------------------------===// -void LLVMContext:: -setInlineAsmDiagnosticHandler(InlineAsmDiagHandlerTy DiagHandler, - void *DiagContext) { - pImpl->InlineAsmDiagHandler = DiagHandler; - pImpl->InlineAsmDiagContext = DiagContext; -} - -/// getInlineAsmDiagnosticHandler - Return the diagnostic handler set by -/// setInlineAsmDiagnosticHandler. -LLVMContext::InlineAsmDiagHandlerTy -LLVMContext::getInlineAsmDiagnosticHandler() const { - return pImpl->InlineAsmDiagHandler; -} - -/// getInlineAsmDiagnosticContext - Return the diagnostic context set by -/// setInlineAsmDiagnosticHandler. -void *LLVMContext::getInlineAsmDiagnosticContext() const { - return pImpl->InlineAsmDiagContext; -} - void LLVMContext::setDiagnosticHandlerCallBack( DiagnosticHandler::DiagnosticHandlerTy DiagnosticHandler, void *DiagnosticContext, bool RespectFilters) { @@ -262,7 +248,7 @@ void LLVMContext::diagnose(const DiagnosticInfo &DI) { exit(1); } -void LLVMContext::emitError(unsigned LocCookie, const Twine &ErrorStr) { +void LLVMContext::emitError(uint64_t LocCookie, const Twine &ErrorStr) { diagnose(DiagnosticInfoInlineAsm(LocCookie, ErrorStr)); } @@ -361,3 +347,7 @@ const DiagnosticHandler *LLVMContext::getDiagHandlerPtr() const { std::unique_ptr<DiagnosticHandler> LLVMContext::getDiagnosticHandler() { return std::move(pImpl->DiagHandler); } + +bool LLVMContext::supportsTypedPointers() const { + return !pImpl->ForceOpaquePointers; +} |