[Beignet] [PATCH] fix issue when build against llvm3.4
Navare, Manasi D
manasi.d.navare at intel.com
Tue Aug 18 16:10:36 PDT 2015
I retested and F_None works good for llvm dump.
I will incorporate this change in my previous patch, rebase and resubmit for review.
Regards
Manasi
-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Navare, Manasi D
Sent: Tuesday, August 18, 2015 3:54 PM
To: Guo, Yejun; beignet at lists.freedesktop.org
Cc: Guo, Yejun
Subject: Re: [Beignet] [PATCH] fix issue when build against llvm3.4
Hi Yejun,
I tried this change on my end. But if we give F_None as the OpenFlags then it is not creating the file specified in the dumpllvmFilename. I am testing agaist llvm 3.5 I am guessing that is happening because if F_NONE is specified it defaults to O_CREAT option but to be able to read this file offline, we need O_RW.
Regards
Manasi
-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Guo Yejun
Sent: Monday, August 17, 2015 3:51 PM
To: beignet at lists.freedesktop.org
Cc: Guo, Yejun
Subject: [Beignet] [PATCH] fix issue when build against llvm3.4
the defines inside 'enum OpenFlags' changed from llvm 3.4 to 3.5, since we are creating a file for write, just use llvm::sys::fs::F_None which is defined by both 3.4 and 3.5
also change the flag to F_None for llvm3.6, since the it is not necessary to use F_RW.
Signed-off-by: Guo Yejun <yejun.guo at intel.com>
---
backend/src/backend/program.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/backend/src/backend/program.cpp b/backend/src/backend/program.cpp index c02096f..0c662c0 100644
--- a/backend/src/backend/program.cpp
+++ b/backend/src/backend/program.cpp
@@ -828,7 +828,7 @@ namespace gbe {
#if LLVM_VERSION_MINOR == 3
0
#else
- llvm::sys::fs::F_RW
+ llvm::sys::fs::F_None
#endif
);
if (err.empty()) {
@@ -839,7 +839,7 @@ namespace gbe {
if (!dumpLLVMFileName.empty()) {
std::error_code err;
llvm::raw_fd_ostream ostream (dumpLLVMFileName.c_str(),
- err, llvm::sys::fs::F_RW);
+ err, llvm::sys::fs::F_None);
if (!err) {
out_module->print(ostream, 0);
} //Otherwise, you'll have to make do without the dump.
--
1.9.1
_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet
_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list