swr/rast: Normalize path for debug metadata
authorGeorge Kyriazis <george.kyriazis@intel.com>
Tue, 13 Feb 2018 18:53:39 +0000 (12:53 -0600)
committerGeorge Kyriazis <george.kyriazis@intel.com>
Fri, 16 Feb 2018 16:54:02 +0000 (10:54 -0600)
in template gen_llvm.hpp

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/codegen/templates/gen_llvm.hpp

index 9db6c61b98814ff18ac4cb664c60cfeb9e910546..d61194dae11211ff39c20d7921ddd6723911bc42 100644 (file)
@@ -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