<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><br>
</p>
<div class="moz-cite-prefix">On 01/05/2017 08:30 PM, Eric
Christopher via cfe-commits wrote:<br>
</div>
<blockquote
cite="mid:CALehDX7NCb+3sX0UxDufugOJPmxVTUt96PBgFW-UE+Ggip01Gw@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr">Ok, thanks. I agree that it's a problem. I'm
definitely open for testing ideas here. There are a few other
things in the TargetOptions/MCTargetOptions area that are
already problematic to test.</div>
</blockquote>
<br>
I think that we need to add serialization for these structures, and
a printing option for them, so that we can test these kinds of
things. That having been said, a lot of these things need to end up
in attributes so that they work correctly with LTO. Is this one of
them?<br>
<br>
-Hal<br>
<br>
<blockquote
cite="mid:CALehDX7NCb+3sX0UxDufugOJPmxVTUt96PBgFW-UE+Ggip01Gw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>-eric</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Thu, Jan 5, 2017 at 6:27 PM Saleem Abdulrasool
<<a moz-do-not-send="true"
href="mailto:compnerd@compnerd.org">compnerd@compnerd.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" class="gmail_msg">This was certainly the
problem that I had. The test really needs a way to check
that the field was set. As you state, this is a problematic
area. The backend already has a test to ensure that the
paths are honored, but, I didn't see any way to actually
ensure that it was getting sent to the backend otherwise.
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">The module itself doesnt encode the
search path, nor is the information in the command line.
I can see the argument that the test itself doesn't add
much value especially with the backend side testing that
the processing of the inclusion does occur correctly.
I'll go ahead and remove the test (which already has ended
up being a pain to test).</div>
</div>
<div dir="ltr" class="gmail_msg">
<div class="gmail_msg">
<div class="gmail_extra gmail_msg"><br class="gmail_msg">
<div class="gmail_quote gmail_msg">On Thu, Jan 5, 2017
at 6:11 PM, Eric Christopher <span dir="ltr"
class="gmail_msg"><<a moz-do-not-send="true"
href="mailto:echristo@gmail.com" class="gmail_msg"
target="_blank">echristo@gmail.com</a>></span>
wrote:<br class="gmail_msg">
<blockquote class="gmail_quote gmail_msg"
style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div dir="ltr" class="gmail_msg">Hi Saleem,
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">Love that you wanted to add
a test for it, but I'd really prefer that you
not engage the backend here in order to do it.
You can verify some of it from the backend and
just that the module is correct via the front
end if you'd like. Ensuring the paths are
correct is a bit of a sticky problem, but this
is an API boundary that we just have problems
with.</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">TL;DR: Would you mind
splitting this test into front end and back end
tests and avoid using the backend in clang's
test harness?</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">Thanks!</div>
<span class="m_4311267162699077709HOEnZb
gmail_msg"><font class="gmail_msg"
color="#888888">
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">-eric</div>
</font></span></div>
<div class="m_4311267162699077709HOEnZb gmail_msg">
<div class="m_4311267162699077709h5 gmail_msg"><br
class="gmail_msg">
<div class="gmail_quote gmail_msg">
<div dir="ltr" class="gmail_msg">On Thu, Jan
5, 2017 at 8:13 AM Saleem Abdulrasool via
cfe-commits <<a moz-do-not-send="true"
href="mailto:cfe-commits@lists.llvm.org"
class="gmail_msg" target="_blank">cfe-commits@lists.llvm.org</a>>
wrote:<br class="gmail_msg">
</div>
<blockquote class="gmail_quote gmail_msg"
style="margin:0 0 0 .8ex;border-left:1px
#ccc solid;padding-left:1ex">Author:
compnerd<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Date: Thu Jan 5 10:02:32 2017<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
New Revision: 291123<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project?rev=291123&view=rev"
rel="noreferrer"
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project?rev=291123&view=rev</a><br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
Log:<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
CodeGen: plumb header search down to the IAS<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
inline assembly may use the `.include`
directive to include other<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
content into the file. Without the
integrated assembler, the `-I` group<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
gets passed to the assembler. Emulate this
by collecting the header<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
search paths and passing them to the IAS.<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Resolves PR24811!<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Added:<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
cfe/trunk/test/CodeGen/include/<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
cfe/trunk/test/CodeGen/include/function.x<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
cfe/trunk/test/CodeGen/include/module.x<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
cfe/trunk/test/CodeGen/inline-asm-inclusion.c<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
Modified:<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
cfe/trunk/include/clang/CodeGen/BackendUtil.h<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
cfe/trunk/lib/CodeGen/BackendUtil.cpp<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
cfe/trunk/lib/CodeGen/CodeGenAction.cpp<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Modified:
cfe/trunk/include/clang/CodeGen/BackendUtil.h<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/CodeGen/BackendUtil.h?rev=291123&r1=291122&r2=291123&view=diff"
rel="noreferrer"
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/CodeGen/BackendUtil.h?rev=291123&r1=291122&r2=291123&view=diff</a><br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
==============================================================================<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
---
cfe/trunk/include/clang/CodeGen/BackendUtil.h
(original)<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+++
cfe/trunk/include/clang/CodeGen/BackendUtil.h
Thu Jan 5 10:02:32 2017<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
@@ -21,6 +21,7 @@ namespace llvm {<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
namespace clang {<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
class DiagnosticsEngine;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ class HeaderSearchOptions;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
class CodeGenOptions;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
class TargetOptions;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
class LangOptions;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
@@ -34,7 +35,8 @@ namespace clang {<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Backend_EmitObj ///< Emit
native object files<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
};<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
- void EmitBackendOutput(DiagnosticsEngine
&Diags, const CodeGenOptions
&CGOpts,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ void EmitBackendOutput(DiagnosticsEngine
&Diags, const HeaderSearchOptions &,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
+ const
CodeGenOptions &CGOpts,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
const
TargetOptions &TOpts, const LangOptions
&LOpts,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
const
llvm::DataLayout &TDesc, llvm::Module
*M,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
BackendAction
Action,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Modified:
cfe/trunk/lib/CodeGen/BackendUtil.cpp<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=291123&r1=291122&r2=291123&view=diff"
rel="noreferrer"
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=291123&r1=291122&r2=291123&view=diff</a><br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
==============================================================================<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp
(original)<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp
Thu Jan 5 10:02:32 2017<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
@@ -14,6 +14,7 @@<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
#include "clang/Frontend/CodeGenOptions.h"<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
#include
"clang/Frontend/FrontendDiagnostic.h"<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
#include "clang/Frontend/Utils.h"<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+#include "clang/Lex/HeaderSearchOptions.h"<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
#include "llvm/ADT/SmallSet.h"<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
#include "llvm/ADT/StringExtras.h"<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
#include "llvm/ADT/StringSwitch.h"<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
@@ -32,6 +33,7 @@<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
#include "llvm/IR/ModuleSummaryIndex.h"<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
#include "llvm/IR/Verifier.h"<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
#include "llvm/LTO/LTOBackend.h"<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+#include "llvm/MC/MCAsmInfo.h"<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
#include "llvm/MC/SubtargetFeature.h"<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
#include
"llvm/Object/ModuleSummaryIndexObjectFile.h"<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
#include "llvm/Passes/PassBuilder.h"<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
@@ -61,6 +63,7 @@ namespace {<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
class EmitAssemblyHelper {<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
DiagnosticsEngine &Diags;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ const HeaderSearchOptions &HSOpts;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
const CodeGenOptions &CodeGenOpts;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
const clang::TargetOptions
&TargetOpts;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
const LangOptions &LangOpts;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
@@ -100,11 +103,14 @@ private:<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
raw_pwrite_stream
&OS);<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
public:<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
- EmitAssemblyHelper(DiagnosticsEngine
&_Diags, const CodeGenOptions
&CGOpts,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ EmitAssemblyHelper(DiagnosticsEngine
&_Diags,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ const
HeaderSearchOptions &HeaderSearchOpts,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
+ const CodeGenOptions
&CGOpts,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
const
clang::TargetOptions &TOpts,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
const LangOptions
&LOpts, Module *M)<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
- : Diags(_Diags), CodeGenOpts(CGOpts),
TargetOpts(TOpts), LangOpts(LOpts),<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
- TheModule(M),
CodeGenerationTime("codegen", "Code
Generation Time") {}<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ : Diags(_Diags),
HSOpts(HeaderSearchOpts),
CodeGenOpts(CGOpts),<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ TargetOpts(TOpts), LangOpts(LOpts),
TheModule(M),<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ CodeGenerationTime("codegen", "Code
Generation Time") {}<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
~EmitAssemblyHelper() {<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
if (CodeGenOpts.DisableFree)<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
@@ -584,12 +590,18 @@ void
EmitAssemblyHelper::CreateTargetMac<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Options.MCOptions.MCNoExecStack =
CodeGenOpts.NoExecStack;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Options.MCOptions.MCIncrementalLinkerCompatible
=<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
CodeGenOpts.IncrementalLinkerCompatible;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
- Options.MCOptions.MCPIECopyRelocations =<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
- CodeGenOpts.PIECopyRelocations;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ Options.MCOptions.MCPIECopyRelocations =
CodeGenOpts.PIECopyRelocations;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Options.MCOptions.MCFatalWarnings =
CodeGenOpts.FatalWarnings;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Options.MCOptions.AsmVerbose =
CodeGenOpts.AsmVerbose;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Options.MCOptions.PreserveAsmComments =
CodeGenOpts.PreserveAsmComments;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Options.MCOptions.ABIName =
TargetOpts.ABI;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ for (const auto &Entry :
HSOpts.UserEntries)<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ if (!Entry.IsFramework &&<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ (Entry.Group ==
frontend::IncludeDirGroup::Quoted ||<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ Entry.Group ==
frontend::IncludeDirGroup::Angled ||<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ Entry.Group ==
frontend::IncludeDirGroup::System))<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+
Options.MCOptions.IASSearchPaths.push_back(<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
+ Entry.IgnoreSysRoot ? Entry.Path
: HSOpts.Sysroot + Entry.Path);<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
TM.reset(TheTarget->createTargetMachine(Triple,
TargetOpts.CPU, FeaturesStr,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Options, RM, CM, OptLevel));<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
@@ -929,17 +941,19 @@ static void
runThinLTOBackend(const Code<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
}<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
void
clang::EmitBackendOutput(DiagnosticsEngine
&Diags,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ const
HeaderSearchOptions &HeaderOpts,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
const
CodeGenOptions &CGOpts,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
const
clang::TargetOptions &TOpts,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
- const
LangOptions &LOpts, const
llvm::DataLayout &TDesc,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
- Module *M,
BackendAction Action,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ const
LangOptions &LOpts,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ const
llvm::DataLayout &TDesc, Module *M,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ BackendAction
Action,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
std::unique_ptr<raw_pwrite_stream>
OS) {<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
if (!CGOpts.ThinLTOIndexFile.empty()) {<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
runThinLTOBackend(CGOpts, M,
std::move(OS));<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
return;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
}<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
- EmitAssemblyHelper AsmHelper(Diags,
CGOpts, TOpts, LOpts, M);<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ EmitAssemblyHelper AsmHelper(Diags,
HeaderOpts, CGOpts, TOpts, LOpts, M);<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
if (CGOpts.ExperimentalNewPassManager)<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
AsmHelper.EmitAssemblyWithNewPassManager(Action,
std::move(OS));<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Modified:
cfe/trunk/lib/CodeGen/CodeGenAction.cpp<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenAction.cpp?rev=291123&r1=291122&r2=291123&view=diff"
rel="noreferrer"
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenAction.cpp?rev=291123&r1=291122&r2=291123&view=diff</a><br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
==============================================================================<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
--- cfe/trunk/lib/CodeGen/CodeGenAction.cpp
(original)<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+++ cfe/trunk/lib/CodeGen/CodeGenAction.cpp
Thu Jan 5 10:02:32 2017<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
@@ -44,6 +44,7 @@ namespace clang {<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
virtual void anchor();<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
DiagnosticsEngine &Diags;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
BackendAction Action;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ const HeaderSearchOptions
&HeaderSearchOpts;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
const CodeGenOptions &CodeGenOpts;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
const TargetOptions &TargetOpts;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
const LangOptions &LangOpts;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
@@ -77,8 +78,8 @@ namespace clang {<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
const
SmallVectorImpl<std::pair<unsigned,
llvm::Module *>> &LinkModules,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
std::unique_ptr<raw_pwrite_stream>
OS, LLVMContext &C,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
CoverageSourceInfo *CoverageInfo =
nullptr)<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
- : Diags(Diags), Action(Action),
CodeGenOpts(CodeGenOpts),<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
- TargetOpts(TargetOpts),
LangOpts(LangOpts),<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ : Diags(Diags), Action(Action),
HeaderSearchOpts(HeaderSearchOpts),<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ CodeGenOpts(CodeGenOpts),
TargetOpts(TargetOpts), LangOpts(LangOpts),<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
AsmOutStream(std::move(OS)),
Context(nullptr),<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
LLVMIRGeneration("irgen", "LLVM
IR Generation Time"),<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
LLVMIRGenerationRefCount(0),<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
@@ -225,8 +226,8 @@ namespace clang {<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
EmbedBitcode(getModule(),
CodeGenOpts, llvm::MemoryBufferRef());<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
- EmitBackendOutput(Diags, CodeGenOpts,
TargetOpts, LangOpts,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
-
C.getTargetInfo().getDataLayout(),<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ EmitBackendOutput(Diags,
HeaderSearchOpts, CodeGenOpts, TargetOpts,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
+ LangOpts,
C.getTargetInfo().getDataLayout(),<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
getModule(),
Action, std::move(AsmOutStream));<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Ctx.setInlineAsmDiagnosticHandler(OldHandler,
OldContext);<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
@@ -898,9 +899,10 @@ void
CodeGenAction::ExecuteAction() {<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Ctx.setInlineAsmDiagnosticHandler(BitcodeInlineAsmDiagHandler,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
&CI.getDiagnostics());<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
- EmitBackendOutput(CI.getDiagnostics(),
CI.getCodeGenOpts(), TargetOpts,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
- CI.getLangOpts(),
CI.getTarget().getDataLayout(),<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
- TheModule.get(), BA,
std::move(OS));<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ EmitBackendOutput(CI.getDiagnostics(),
CI.getHeaderSearchOpts(),<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ CI.getCodeGenOpts(),
TargetOpts, CI.getLangOpts(),<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+
CI.getTarget().getDataLayout(),
TheModule.get(), BA,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ std::move(OS));<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
return;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
}<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Modified:
cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp?rev=291123&r1=291122&r2=291123&view=diff"
rel="noreferrer"
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp?rev=291123&r1=291122&r2=291123&view=diff</a><br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
==============================================================================<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
---
cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
(original)<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+++
cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
Thu Jan 5 10:02:32 2017<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
@@ -282,7 +282,7 @@ public:<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
// Print the IR for the PCH container
to the debug output.<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
llvm::SmallString<0> Buffer;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
clang::EmitBackendOutput(<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
- Diags, CodeGenOpts, TargetOpts,
LangOpts,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ Diags, HeaderSearchOpts,
CodeGenOpts, TargetOpts, LangOpts,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Ctx.getTargetInfo().getDataLayout(),
M.get(),<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
BackendAction::Backend_EmitLL,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
llvm::make_unique<llvm::raw_svector_ostream>(Buffer));<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
@@ -290,9 +290,10 @@ public:<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
});<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
// Use the LLVM backend to emit the pch
container.<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
- clang::EmitBackendOutput(Diags,
CodeGenOpts, TargetOpts, LangOpts,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
-
Ctx.getTargetInfo().getDataLayout(),
M.get(),<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
-
BackendAction::Backend_EmitObj,
std::move(OS));<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ clang::EmitBackendOutput(Diags,
HeaderSearchOpts, CodeGenOpts, TargetOpts,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
+ LangOpts,
Ctx.getTargetInfo().getDataLayout(),<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ M.get(),
BackendAction::Backend_EmitObj,<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+
std::move(OS));<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
// Free the memory for the temporary
buffer.<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
llvm::SmallVector<char, 0> Empty;<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Added:
cfe/trunk/test/CodeGen/include/function.x<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/include/function.x?rev=291123&view=auto"
rel="noreferrer"
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/include/function.x?rev=291123&view=auto</a><br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
==============================================================================<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
---
cfe/trunk/test/CodeGen/include/function.x
(added)<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+++
cfe/trunk/test/CodeGen/include/function.x
Thu Jan 5 10:02:32 2017<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
@@ -0,0 +1 @@<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+FUNCTION = 1<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Added:
cfe/trunk/test/CodeGen/include/module.x<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/include/module.x?rev=291123&view=auto"
rel="noreferrer"
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/include/module.x?rev=291123&view=auto</a><br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
==============================================================================<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
--- cfe/trunk/test/CodeGen/include/module.x
(added)<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+++ cfe/trunk/test/CodeGen/include/module.x
Thu Jan 5 10:02:32 2017<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
@@ -0,0 +1 @@<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+MODULE = 1<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
Added:
cfe/trunk/test/CodeGen/inline-asm-inclusion.c<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/inline-asm-inclusion.c?rev=291123&view=auto"
rel="noreferrer"
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/inline-asm-inclusion.c?rev=291123&view=auto</a><br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
==============================================================================<br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
---
cfe/trunk/test/CodeGen/inline-asm-inclusion.c
(added)<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+++
cfe/trunk/test/CodeGen/inline-asm-inclusion.c
Thu Jan 5 10:02:32 2017<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
@@ -0,0 +1,10 @@<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+// RUN: %clang_cc1 -I %p/include -S -o - %s
| FileCheck %s<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+__asm__(".include \"module.x\"");<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+void function(void) {<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+ __asm__(".include \"function.x\"");<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+}<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+// CHECK: MODULE = 1<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+// CHECK: FUNCTION = 1<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
+<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
_______________________________________________<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
cfe-commits mailing list<br
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg">
<a moz-do-not-send="true"
href="mailto:cfe-commits@lists.llvm.org"
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg" target="_blank">cfe-commits@lists.llvm.org</a><br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
<a moz-do-not-send="true"
href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits"
rel="noreferrer"
class="m_4311267162699077709m_3047051816736469638gmail_msg
gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br
class="m_4311267162699077709m_3047051816736469638gmail_msg gmail_msg">
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<br class="gmail_msg">
<br class="gmail_msg" clear="all">
<div class="gmail_msg"><br class="gmail_msg">
</div>
</div>
</div>
</div>
<div dir="ltr" class="gmail_msg">
<div class="gmail_msg">
<div class="gmail_extra gmail_msg">-- <br
class="gmail_msg">
<div class="m_4311267162699077709gmail_signature
gmail_msg" data-smartmail="gmail_signature">Saleem
Abdulrasool<br class="gmail_msg">
compnerd (at) compnerd (dot) org</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
cfe-commits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</body>
</html>