<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - DIFile instructions in LLVM bitcode do not get emitted to source maps"
href="https://bugs.llvm.org/show_bug.cgi?id=47312">47312</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>DIFile instructions in LLVM bitcode do not get emitted to source maps
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: WebAssembly
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>scott.waye@hubse.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>I could be missing how this works in that my bitcode may be wrong/missing
something, but I have in the bitcode
```
!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "ILC",
isOptimized: false, runtimeVersion: 1, emissionKind: FullDebug,
splitDebugInlining: false)
!1 = !DIFile(filename: "MathHelpers.cs", directory:
"corert/src/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers")
```
But when compiling (and I'm using the emscripten front end with the -g4
--source-map-base options), the source files are not written out.
I compile the bitcode to wasm object with
```
E:\GitHub\emsdk\upstream\emscripten\emcc.bat
"E:\GitHub\corert\tests\src\Simple\HelloWasm\obj\Debug\wasm\native\HelloWasm.bc"
-c -o
"E:\GitHub\corert\tests\src\Simple\HelloWasm\obj\Debug\wasm\native\HelloWasm.o"
-s WASM=1 -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s DISABLE_EXCEPTION_CATCHING=0 -g4
```
and then link with
```
"E:\GitHub\emsdk\upstream\emscripten\emcc.bat"
"E:\GitHub\corert\tests\src\Simple\HelloWasm\obj\Debug\wasm\native\HelloWasm.o"
-o
"E:\GitHub\corert\tests\src\Simple\HelloWasm\bin\Debug\wasm\native\HelloWasm.html"
-s WASM=1 -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s DISABLE_EXCEPTION_CATCHING=0 -s
WASM_MEM_MAX=200Mb --emrun
"E:\GitHub\corert\tests\\..\bin\WebAssembly.wasm.Debug/sdk/libPortableRuntime.a"
"E:\GitHub\corert\tests\\..\bin\WebAssembly.wasm.Debug/sdk/libbootstrappercpp.a"
"E:\GitHub\corert\tests\\..\bin\WebAssembly.wasm.Debug/sdk/libSystem.Private.CoreLib.Native.a"
-g3 -s INITIAL_MEMORY=167772160 --js-library
E:\GitHub\corert\tests\src\Simple\HelloWasm\dotnet_support.js --pre-js
E:\GitHub\corert\tests\src\Simple\HelloWasm\Microsoft.JSInterop.js --post-js
E:\GitHub\corert\tests\src\Simple\HelloWasm\HelloWasm.js -g4 --source-map-base
<a href="http://localhost/corerthellowasm/">http://localhost/corerthellowasm/</a>
```
I expect to see in the resulting HelloWasm.wasm.map an entry for MathHelpers.cs
but there is none.
(Dont think the markdown works, but at least it helps to separate)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>