From 2a030a3aec48ed18846518aab60e5e5e72f381cc Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Thu, 2 Jan 2014 15:08:04 +0000 Subject: Verify that clang TargetInfo descriptions match DataLayout strings from LLVM The backend string is only verified when available as it's possible to run clang IRGen for targets that haven't been built or don't exist in LLVM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198309 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenAction.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/CodeGen/CodeGenAction.cpp') diff --git a/lib/CodeGen/CodeGenAction.cpp b/lib/CodeGen/CodeGenAction.cpp index 8efeba68e5..d4f3b8db95 100644 --- a/lib/CodeGen/CodeGenAction.cpp +++ b/lib/CodeGen/CodeGenAction.cpp @@ -150,6 +150,7 @@ namespace clang { Ctx.setInlineAsmDiagnosticHandler(InlineAsmDiagHandler, this); EmitBackendOutput(Diags, CodeGenOpts, TargetOpts, LangOpts, + C.getTargetInfo().getTargetDescription(), TheModule.get(), Action, AsmOutStream); Ctx.setInlineAsmDiagnosticHandler(OldHandler, OldContext); @@ -420,10 +421,9 @@ void CodeGenAction::ExecuteAction() { TheModule->setTargetTriple(TargetOpts.Triple); } - EmitBackendOutput(CI.getDiagnostics(), CI.getCodeGenOpts(), - TargetOpts, CI.getLangOpts(), - TheModule.get(), - BA, OS); + EmitBackendOutput(CI.getDiagnostics(), CI.getCodeGenOpts(), TargetOpts, + CI.getLangOpts(), CI.getTarget().getTargetDescription(), + TheModule.get(), BA, OS); return; } -- cgit v1.2.3