[Mesa-dev] [PATCH 30/31] swr/rast: Normalize path for debug metadata

George Kyriazis george.kyriazis at intel.com
Tue Feb 13 22:42:48 UTC 2018


in template gen_llvm.hpp
---
 src/gallium/drivers/swr/rasterizer/codegen/templates/gen_llvm.hpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_llvm.hpp b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_llvm.hpp
index 9db6c61..d61194d 100644
--- a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_llvm.hpp
+++ b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_llvm.hpp
@@ -57,7 +57,7 @@ namespace SwrJit
 
             // Compute debug metadata
             llvm::DIBuilder builder(*pJitMgr->mpCurrentModule);
-            llvm::DIFile* pFile = builder.createFile("${input_file}", "${input_dir}");
+            llvm::DIFile* pFile = builder.createFile("${input_file}", "${os.path.normpath(input_dir).replace('\\', '/')}");
 
             std::vector<std::pair<std::string, uint32_t>> dbgMembers;
             %for member in type['members']:
@@ -79,6 +79,7 @@ namespace SwrJit
 } // ns SwrJit
 
 <%! # Global function definitions
+    import os
     def calc_max_len(fields):
         max_type_len = 0
         max_name_len = 0
-- 
2.7.4



More information about the mesa-dev mailing list