mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
C#: Store output assembly in compilation_assembly relation
This commit is contained in:
@@ -21,9 +21,10 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
|
||||
protected override void Populate(TextWriter trapFile)
|
||||
{
|
||||
Extraction.Entities.Assembly.CreateOutputAssembly(cx);
|
||||
var assembly = Extraction.Entities.Assembly.CreateOutputAssembly(cx);
|
||||
|
||||
trapFile.compilations(this, FileUtils.ConvertToUnix(cwd));
|
||||
trapFile.compilation_assembly(this, assembly);
|
||||
|
||||
// Arguments
|
||||
var index = 0;
|
||||
|
||||
@@ -111,6 +111,11 @@ namespace Semmle.Extraction.CSharp
|
||||
trapFile.WriteTuple("compilations", compilation, cwd);
|
||||
}
|
||||
|
||||
internal static void compilation_assembly(this TextWriter trapFile, Compilation compilation, Assembly assembly)
|
||||
{
|
||||
trapFile.WriteTuple("compilation_assembly", compilation, assembly);
|
||||
}
|
||||
|
||||
internal static void compiler_generated(this TextWriter trapFile, IEntity entity)
|
||||
{
|
||||
trapFile.WriteTuple("compiler_generated", entity);
|
||||
|
||||
@@ -58,7 +58,8 @@ namespace Semmle.Extraction.Entities
|
||||
}
|
||||
|
||||
private static readonly object outputAssemblyCacheKey = new object();
|
||||
public static Location CreateOutputAssembly(Context cx)
|
||||
|
||||
public static Assembly CreateOutputAssembly(Context cx)
|
||||
{
|
||||
if (cx.Extractor.OutputPath == null)
|
||||
throw new InternalError("Attempting to create the output assembly in standalone extraction mode");
|
||||
|
||||
Reference in New Issue
Block a user