Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
91d2f5af
Unverified
Commit
91d2f5af
authored
Feb 11, 2020
by
hlu1
Committed by
GitHub
Feb 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[LLVM] Explicit llvm::StringRef to std::string conversion (#4859)
parent
31c2f979
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/target/llvm/codegen_llvm.cc
+3
-3
src/target/llvm/llvm_module.cc
+2
-2
No files found.
src/target/llvm/codegen_llvm.cc
View file @
91d2f5af
...
...
@@ -88,7 +88,7 @@ void CodeGenLLVM::InitTarget(llvm::TargetMachine* tm) {
native_vector_bits_
=
128
;
}
else
{
native_vector_bits_
=
128
;
std
::
string
arch_name
=
tm
->
getTargetTriple
().
getArchName
(
);
std
::
string
arch_name
=
std
::
string
(
tm
->
getTargetTriple
().
getArchName
()
);
LOG
(
WARNING
)
<<
"Set native vector bits to be 128 for "
<<
arch_name
;
}
}
...
...
@@ -186,7 +186,7 @@ void CodeGenLLVM::HandleImport(const std::string& code) {
code
.
substr
(
code
.
length
()
-
3
)
==
".bc"
))
{
mlib
=
llvm
::
parseIRFile
(
code
,
err
,
*
ctx_
);
if
(
mlib
.
get
()
==
nullptr
)
{
std
::
string
msg
=
err
.
getMessage
(
);
std
::
string
msg
=
std
::
string
(
err
.
getMessage
()
);
LOG
(
FATAL
)
<<
"Fail to load bitcode file "
<<
code
<<
"
\n
"
<<
"line "
<<
err
.
getLineNo
()
<<
":"
<<
msg
;
}
...
...
@@ -195,7 +195,7 @@ void CodeGenLLVM::HandleImport(const std::string& code) {
llvm
::
MemoryBuffer
::
getMemBuffer
(
code
);
mlib
=
llvm
::
parseIR
(
*
buf
,
err
,
*
ctx_
);
if
(
mlib
.
get
()
==
nullptr
)
{
std
::
string
msg
=
err
.
getMessage
(
);
std
::
string
msg
=
std
::
string
(
err
.
getMessage
()
);
LOG
(
FATAL
)
<<
"Fail to load llvm ir "
<<
"line "
<<
err
.
getLineNo
()
<<
":"
<<
msg
<<
"
\n
content:
\n
"
<<
code
;
...
...
src/target/llvm/llvm_module.cc
View file @
91d2f5af
...
...
@@ -231,7 +231,7 @@ class LLVMModuleNode final : public runtime::ModuleNode {
llvm
::
SMDiagnostic
err
;
module_
=
std
::
move
(
module
);
if
(
module_
==
nullptr
)
{
std
::
string
msg
=
err
.
getMessage
(
);
std
::
string
msg
=
std
::
string
(
err
.
getMessage
()
);
LOG
(
FATAL
)
<<
"Fail to load module: "
<<
msg
;
}
std
::
string
target_
;
...
...
@@ -254,7 +254,7 @@ class LLVMModuleNode final : public runtime::ModuleNode {
llvm
::
SMDiagnostic
err
;
auto
module
=
llvm
::
parseIRFile
(
file_name
,
err
,
*
ctx
);
if
(
module
==
nullptr
)
{
std
::
string
msg
=
err
.
getMessage
(
);
std
::
string
msg
=
std
::
string
(
err
.
getMessage
()
);
LOG
(
FATAL
)
<<
"Fail to load ir file "
<<
file_name
<<
"
\n
"
<<
"line "
<<
err
.
getLineNo
()
<<
":"
<<
msg
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment