]> granicus.if.org Git - clang/commitdiff
adjust for llvm mainline, yay type safety
authorChris Lattner <sabre@nondot.org>
Wed, 17 Nov 2010 08:13:04 +0000 (08:13 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 17 Nov 2010 08:13:04 +0000 (08:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119487 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenAction.cpp

index 51c55a1a8390061efa86e1650046d41871041702..6614531779cd60557f5468eaa997f393d395a3c0 100644 (file)
@@ -121,10 +121,10 @@ namespace {
       // Install an inline asm handler so that diagnostics get printed through
       // our diagnostics hooks.
       LLVMContext &Ctx = TheModule->getContext();
-      void *OldHandler = Ctx.getInlineAsmDiagnosticHandler();
+      LLVMContext::InlineAsmDiagHandlerTy OldHandler =
+        Ctx.getInlineAsmDiagnosticHandler();
       void *OldContext = Ctx.getInlineAsmDiagnosticContext();
-      Ctx.setInlineAsmDiagnosticHandler((void*)(intptr_t)InlineAsmDiagHandler,
-                                        this);
+      Ctx.setInlineAsmDiagnosticHandler(InlineAsmDiagHandler, this);
 
       EmitBackendOutput(Diags, CodeGenOpts, TargetOpts,
                         TheModule.get(), Action, AsmOutStream);