Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
1cbbbc09
R
Rust
项目概览
int
/
Rust
11 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1cbbbc09
编写于
1月 09, 2018
作者:
K
kennytm
提交者:
GitHub
1月 09, 2018
浏览文件
操作
浏览文件
下载
差异文件
Rollup merge of #47233 - dotdash:cleanup_llvm, r=alexcrichton
Remove unused LLVM related code Ticks a few more boxes on #46437
上级
4a6f4409
907855fe
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
1 addition
and
58 deletion
+1
-58
src/librustc/session/config.rs
src/librustc/session/config.rs
+0
-4
src/librustc_driver/lib.rs
src/librustc_driver/lib.rs
+0
-5
src/librustc_llvm/ffi.rs
src/librustc_llvm/ffi.rs
+0
-6
src/librustc_llvm/lib.rs
src/librustc_llvm/lib.rs
+0
-5
src/librustc_trans/lib.rs
src/librustc_trans/lib.rs
+1
-1
src/librustc_trans/llvm_util.rs
src/librustc_trans/llvm_util.rs
+0
-4
src/rustllvm/RustWrapper.cpp
src/rustllvm/RustWrapper.cpp
+0
-31
src/rustllvm/rustllvm.h
src/rustllvm/rustllvm.h
+0
-2
未找到文件。
src/librustc/session/config.rs
浏览文件 @
1cbbbc09
...
...
@@ -1084,8 +1084,6 @@ fn parse_optimization_fuel(slot: &mut Option<(String, u64)>, v: Option<&str>) ->
"omit landing pads for unwinding"
),
fewer_names
:
bool
=
(
false
,
parse_bool
,
[
TRACKED
],
"reduce memory use by retaining fewer names within compilation artifacts (LLVM-IR)"
),
debug_llvm
:
bool
=
(
false
,
parse_bool
,
[
UNTRACKED
],
"enable debug output from LLVM"
),
meta_stats
:
bool
=
(
false
,
parse_bool
,
[
UNTRACKED
],
"gather metadata statistics"
),
print_link_args
:
bool
=
(
false
,
parse_bool
,
[
UNTRACKED
],
...
...
@@ -2747,8 +2745,6 @@ fn test_debugging_options_tracking_hash() {
assert_eq!
(
reference
.dep_tracking_hash
(),
opts
.dep_tracking_hash
());
opts
.debugging_opts.borrowck_stats
=
true
;
assert_eq!
(
reference
.dep_tracking_hash
(),
opts
.dep_tracking_hash
());
opts
.debugging_opts.debug_llvm
=
true
;
assert_eq!
(
reference
.dep_tracking_hash
(),
opts
.dep_tracking_hash
());
opts
.debugging_opts.meta_stats
=
true
;
assert_eq!
(
reference
.dep_tracking_hash
(),
opts
.dep_tracking_hash
());
opts
.debugging_opts.print_link_args
=
true
;
...
...
src/librustc_driver/lib.rs
浏览文件 @
1cbbbc09
...
...
@@ -167,7 +167,6 @@ mod rustc_trans {
pub
use
rustc_trans_utils
::
trans_crate
::
TranslatedCrate
as
CrateTranslation
;
pub
fn
init
(
_
sess
:
&
Session
)
{}
pub
fn
enable_llvm_debug
()
{}
pub
fn
print_version
()
{}
pub
fn
print_passes
()
{}
pub
fn
print
(
_
req
:
PrintRequest
,
_
sess
:
&
Session
)
{}
...
...
@@ -205,10 +204,6 @@ pub fn run_compiler<'a>(args: &[String],
let
(
sopts
,
cfg
)
=
config
::
build_session_options_and_crate_config
(
&
matches
);
if
sopts
.debugging_opts.debug_llvm
{
rustc_trans
::
enable_llvm_debug
();
}
let
descriptions
=
diagnostics_registry
();
do_or_return!
(
callbacks
.early_callback
(
&
matches
,
...
...
src/librustc_llvm/ffi.rs
浏览文件 @
1cbbbc09
...
...
@@ -1315,9 +1315,6 @@ pub fn LLVMStructSetBody(StructTy: TypeRef,
ElementCount
:
c_uint
,
Packed
:
Bool
);
/// Enables LLVM debug output.
pub
fn
LLVMRustSetDebug
(
Enabled
:
c_int
);
/// Prepares inline assembly.
pub
fn
LLVMRustInlineAsm
(
Ty
:
TypeRef
,
AsmString
:
*
const
c_char
,
...
...
@@ -1610,7 +1607,6 @@ pub fn LLVMRustPrintModule(PM: PassManagerRef,
pub
fn
LLVMRustSetNormalizedTarget
(
M
:
ModuleRef
,
triple
:
*
const
c_char
);
pub
fn
LLVMRustAddAlwaysInlinePass
(
P
:
PassManagerBuilderRef
,
AddLifetimes
:
bool
);
pub
fn
LLVMRustLinkInExternalBitcode
(
M
:
ModuleRef
,
bc
:
*
const
c_char
,
len
:
size_t
)
->
bool
;
pub
fn
LLVMRustLinkInParsedExternalBitcode
(
M
:
ModuleRef
,
M
:
ModuleRef
)
->
bool
;
pub
fn
LLVMRustRunRestrictionPass
(
M
:
ModuleRef
,
syms
:
*
const
*
const
c_char
,
len
:
size_t
);
pub
fn
LLVMRustMarkAllFunctionsNounwind
(
M
:
ModuleRef
);
...
...
@@ -1646,8 +1642,6 @@ pub fn LLVMRustUnpackInlineAsmDiagnostic(DI: DiagnosticInfoRef,
pub
fn
LLVMRustWriteDiagnosticInfoToString
(
DI
:
DiagnosticInfoRef
,
s
:
RustStringRef
);
pub
fn
LLVMRustGetDiagInfoKind
(
DI
:
DiagnosticInfoRef
)
->
DiagnosticKind
;
pub
fn
LLVMRustWriteDebugLocToString
(
C
:
ContextRef
,
DL
:
DebugLocRef
,
s
:
RustStringRef
);
pub
fn
LLVMRustSetInlineAsmDiagnosticHandler
(
C
:
ContextRef
,
H
:
InlineAsmDiagHandler
,
CX
:
*
mut
c_void
);
...
...
src/librustc_llvm/lib.rs
浏览文件 @
1cbbbc09
...
...
@@ -296,11 +296,6 @@ pub unsafe fn twine_to_string(tr: TwineRef) -> String {
build_string
(|
s
|
LLVMRustWriteTwineToString
(
tr
,
s
))
.expect
(
"got a non-UTF8 Twine from LLVM"
)
}
pub
unsafe
fn
debug_loc_to_string
(
c
:
ContextRef
,
tr
:
DebugLocRef
)
->
String
{
build_string
(|
s
|
LLVMRustWriteDebugLocToString
(
c
,
tr
,
s
))
.expect
(
"got a non-UTF8 DebugLoc from LLVM"
)
}
pub
fn
initialize_available_targets
()
{
macro_rules!
init_target
(
(
$cfg:meta
,
$
(
$method:ident
),
*
)
=>
{
{
...
...
src/librustc_trans/lib.rs
浏览文件 @
1cbbbc09
...
...
@@ -69,7 +69,7 @@
use
back
::
bytecode
::
RLIB_BYTECODE_EXTENSION
;
pub
use
metadata
::
LlvmMetadataLoader
;
pub
use
llvm_util
::{
init
,
target_features
,
print_version
,
print_passes
,
print
,
enable_llvm_debug
};
pub
use
llvm_util
::{
init
,
target_features
,
print_version
,
print_passes
,
print
};
use
std
::
any
::
Any
;
use
std
::
path
::
PathBuf
;
...
...
src/librustc_trans/llvm_util.rs
浏览文件 @
1cbbbc09
...
...
@@ -140,7 +140,3 @@ pub fn print(req: PrintRequest, sess: &Session) {
}
}
}
pub
fn
enable_llvm_debug
()
{
unsafe
{
llvm
::
LLVMRustSetDebug
(
1
);
}
}
src/rustllvm/RustWrapper.cpp
浏览文件 @
1cbbbc09
...
...
@@ -384,12 +384,6 @@ LLVMRustBuildAtomicFence(LLVMBuilderRef B, LLVMAtomicOrdering Order,
return
wrap
(
unwrap
(
B
)
->
CreateFence
(
fromRust
(
Order
),
fromRust
(
Scope
)));
}
extern
"C"
void
LLVMRustSetDebug
(
int
Enabled
)
{
#ifndef NDEBUG
DebugFlag
=
Enabled
;
#endif
}
enum
class
LLVMRustAsmDialect
{
Other
,
Att
,
...
...
@@ -933,23 +927,6 @@ extern "C" bool LLVMRustLinkInExternalBitcode(LLVMModuleRef DstRef, char *BC,
return
true
;
}
extern
"C"
bool
LLVMRustLinkInParsedExternalBitcode
(
LLVMModuleRef
DstRef
,
LLVMModuleRef
SrcRef
)
{
#if LLVM_VERSION_GE(4, 0)
Module
*
Dst
=
unwrap
(
DstRef
);
std
::
unique_ptr
<
Module
>
Src
(
unwrap
(
SrcRef
));
if
(
Linker
::
linkModules
(
*
Dst
,
std
::
move
(
Src
)))
{
LLVMRustSetLastError
(
"failed to link modules"
);
return
false
;
}
return
true
;
#else
LLVMRustSetLastError
(
"can't link parsed modules on this LLVM"
);
return
false
;
#endif
}
// Note that the two following functions look quite similar to the
// LLVMGetSectionName function. Sadly, it appears that this function only
// returns a char* pointer, which isn't guaranteed to be null-terminated. The
...
...
@@ -981,7 +958,6 @@ extern "C" LLVMTypeRef LLVMRustArrayType(LLVMTypeRef ElementTy,
}
DEFINE_SIMPLE_CONVERSION_FUNCTIONS
(
Twine
,
LLVMTwineRef
)
DEFINE_SIMPLE_CONVERSION_FUNCTIONS
(
DebugLoc
,
LLVMDebugLocRef
)
extern
"C"
void
LLVMRustWriteTwineToString
(
LLVMTwineRef
T
,
RustStringRef
Str
)
{
RawRustStringOstream
OS
(
Str
);
...
...
@@ -1130,13 +1106,6 @@ extern "C" LLVMTypeKind LLVMRustGetTypeKind(LLVMTypeRef Ty) {
report_fatal_error
(
"Unhandled TypeID."
);
}
extern
"C"
void
LLVMRustWriteDebugLocToString
(
LLVMContextRef
C
,
LLVMDebugLocRef
DL
,
RustStringRef
Str
)
{
RawRustStringOstream
OS
(
Str
);
unwrap
(
DL
)
->
print
(
OS
);
}
DEFINE_SIMPLE_CONVERSION_FUNCTIONS
(
SMDiagnostic
,
LLVMSMDiagnosticRef
)
extern
"C"
void
LLVMRustSetInlineAsmDiagnosticHandler
(
...
...
src/rustllvm/rustllvm.h
浏览文件 @
1cbbbc09
...
...
@@ -103,9 +103,7 @@ enum LLVMRustAttribute {
typedef
struct
OpaqueRustString
*
RustStringRef
;
typedef
struct
LLVMOpaqueTwine
*
LLVMTwineRef
;
typedef
struct
LLVMOpaqueDebugLoc
*
LLVMDebugLocRef
;
typedef
struct
LLVMOpaqueSMDiagnostic
*
LLVMSMDiagnosticRef
;
typedef
struct
LLVMOpaqueRustJITMemoryManager
*
LLVMRustJITMemoryManagerRef
;
extern
"C"
void
LLVMRustStringWriteImpl
(
RustStringRef
Str
,
const
char
*
Ptr
,
size_t
Size
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录