mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Fixes for ShowWrongHash, looking into debug info issues in opt llvm
This commit is contained in:
parent
c67fbd66ba
commit
54d5884213
8 changed files with 69 additions and 34 deletions
|
@ -1,5 +1,6 @@
|
|||
#include "BfIRCodeGen.h"
|
||||
#include "BfModule.h"
|
||||
#include "BeefySysLib/util/BeefPerf.h"
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4141)
|
||||
|
@ -4057,6 +4058,19 @@ bool BfIRCodeGen::WriteObjectFile(const StringImpl& outFileName, const BfCodeGen
|
|||
}
|
||||
|
||||
bool success = PM.run(*mLLVMModule);
|
||||
|
||||
if ((codeGenOptions.mOptLevel > BfOptLevel_O0) && (codeGenOptions.mWriteLLVMIR))
|
||||
{
|
||||
BP_ZONE("BfCodeGen::RunLoop.LLVM.IR");
|
||||
String fileName = outFileName;
|
||||
int dotPos = (int)fileName.LastIndexOf('.');
|
||||
if (dotPos != -1)
|
||||
fileName.RemoveToEnd(dotPos);
|
||||
|
||||
fileName += "_OPT.ll";
|
||||
String irError;
|
||||
WriteIR(fileName, irError);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue