Skip to content

Commit

Permalink
Use n32:64 in RISC-V data layout (#7175)
Browse files Browse the repository at this point in the history
* Use n32:64 in RISC-V data layout

* Remove unused LLVM header
  • Loading branch information
dkurt authored Nov 28, 2022
1 parent 81c79d5 commit 3ff9e66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/LLVM_Headers.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include <llvm/Analysis/TargetTransformInfo.h>
#include <llvm/Bitcode/BitcodeReader.h>
#include <llvm/Bitcode/BitcodeWriter.h>
#include <llvm/ExecutionEngine/JITEventListener.h>
#include <llvm/ExecutionEngine/Orc/LLJIT.h>
#include <llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h>
#include <llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h>
Expand Down
4 changes: 4 additions & 0 deletions src/LLVM_Runtime_Linker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,11 @@ llvm::DataLayout get_data_layout_for_target(Target target) {
if (target.bits == 32) {
return llvm::DataLayout("e-m:e-p:32:32-i64:64-n32-S128");
} else {
#if LLVM_VERSION >= 160
return llvm::DataLayout("e-m:e-p:64:64-i64:64-i128:128-n32:64-S128");
#else
return llvm::DataLayout("e-m:e-p:64:64-i64:64-i128:128-n64-S128");
#endif
}
} else {
internal_error << "Bad target arch: " << target.arch << "\n";
Expand Down

0 comments on commit 3ff9e66

Please sign in to comment.